X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2FFont.h;h=07cd35f0a5f32867e33487fbb082b578d589478d;hb=7651db1476453d8d4162e8708265a36c1a3c0441;hp=86448025992fcbd509e30c1996738a9e8adaba20;hpb=0542849dfccfec1ce1477265fa0fee2401a8fb23;p=l2e.git diff --git a/src/graphics/Font.h b/src/graphics/Font.h index 8644802..07cd35f 100644 --- a/src/graphics/Font.h +++ b/src/graphics/Font.h @@ -18,7 +18,10 @@ namespace graphics { class Font { public: - explicit Font(const Sprite *sprite, int colOffset = 0, int rowOffset = 0) + 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) { } @@ -31,6 +34,14 @@ public: 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; +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;