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