22 #ifndef FIFE_GUI_FONT_H
23 #define FIFE_GUI_FONT_H
28 #include <guichan/font.hpp>
34 #include "video/fonts/ifont.h"
39 class GuiFont :
public gcn::Font,
public IFont {
47 int32_t getStringIndexAt(
const std::string& text, int32_t x)
const;
48 void drawString(gcn::Graphics* graphics,
const std::string& text, int32_t x, int32_t y);
49 void drawMultiLineString(gcn::Graphics* graphics,
const std::string& text, int32_t x, int32_t y);
50 std::string splitTextToWidth (
const std::string& text, int32_t render_width);
52 void setRowSpacing (int32_t spacing);
53 int32_t getRowSpacing()
const;
54 void setGlyphSpacing(int32_t spacing);
55 int32_t getGlyphSpacing()
const;
56 void setAntiAlias(
bool antiAlias);
58 Image* getAsImage(
const std::string& text);
59 Image* getAsImageMultiline(
const std::string& text);
60 void setColor(uint8_t r,uint8_t g,uint8_t b, uint8_t a = 255);
61 SDL_Color getColor()
const;
62 int32_t getWidth(
const std::string& text)
const;
63 int32_t getHeight()
const;
credit to phoku for his NodeDisplay example which the visitor code is adapted from ( he coded the qua...