X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2FFont.h;fp=src%2Fgraphics%2FFont.h;h=571431df74dca406a73572c881669eda69208513;hb=8e0746ace8c76025faad3259a819d57610407bb8;hp=86448025992fcbd509e30c1996738a9e8adaba20;hpb=31883e0019783f10553ddcc122a49728934bd832;p=l2e.git diff --git a/src/graphics/Font.h b/src/graphics/Font.h index 8644802..571431d 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,11 @@ 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; } + private: const Sprite *sprite; int colOffset;