X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2FFont.h;h=b981946642925a10980d48532a89d9d3065afb05;hb=f552d26f537af9fa48255bd71cdc1a0a1b860bac;hp=571431df74dca406a73572c881669eda69208513;hpb=8e0746ace8c76025faad3259a819d57610407bb8;p=l2e.git diff --git a/src/graphics/Font.h b/src/graphics/Font.h index 571431d..b981946 100644 --- a/src/graphics/Font.h +++ b/src/graphics/Font.h @@ -17,6 +17,9 @@ namespace graphics { class Font { +public: + static const int TYPE_ID = 404; + public: explicit Font(const Sprite *sprite = 0, int colOffset = 0, int rowOffset = 0) : sprite(sprite), colOffset(colOffset), rowOffset(rowOffset) { @@ -28,14 +31,19 @@ public: int CharHeight() const { return sprite->Height(); } void DrawChar(char c, SDL_Surface *dest, const geometry::Vector &position) const; void DrawString(const char *s, SDL_Surface *dest, const geometry::Vector &position, int maxChars = 0) const; + void DrawStringRight(const char *s, SDL_Surface *dest, const geometry::Vector &position, int maxChars = 0) const; void DrawDigit(int d, SDL_Surface *dest, const geometry::Vector &position) const; void DrawNumber(int n, SDL_Surface *dest, const geometry::Vector &position, int digits = 0) const; + void DrawNumberRight(int n, SDL_Surface *dest, const geometry::Vector &position, int digits = 0) const; public: void SetSprite(const Sprite *s) { sprite = s; } void SetColOffset(int n) { colOffset = n; } void SetRowOffset(int n) { rowOffset = n; } + static void CreateTypeDescription(); + static void Construct(void *); + private: const Sprite *sprite; int colOffset;