X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;ds=sidebyside;f=src%2Fgraphics%2FFont.h;h=a5d7b12d690019f0dfd070cd759cc1591521a94d;hb=2590fad63e8a2013c1a169c77f21931bc19f2f25;hp=b981946642925a10980d48532a89d9d3065afb05;hpb=f552d26f537af9fa48255bd71cdc1a0a1b860bac;p=l2e.git diff --git a/src/graphics/Font.h b/src/graphics/Font.h index b981946..a5d7b12 100644 --- a/src/graphics/Font.h +++ b/src/graphics/Font.h @@ -29,9 +29,12 @@ public: public: int CharWidth() const { return sprite->Width(); } int CharHeight() const { return sprite->Height(); } + int StringWidth(const char *) const; + int StringHeight(const char *) const; + 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 DrawString(const char *s, SDL_Surface *dest, const geometry::Vector &position, int maxWidth = 0) const; + void DrawStringRight(const char *s, SDL_Surface *dest, const geometry::Vector &position, int maxWidth = 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;