X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2FFont.h;h=c879dcedf73e4fc8a6803cac9651e1e7c0e538af;hb=7f0a586b8238c7093a8942ff5b5c4122edd386fc;hp=b981946642925a10980d48532a89d9d3065afb05;hpb=c591893775d3b850d0a88e743c09c91db337fbdc;p=l2e.git diff --git a/src/graphics/Font.h b/src/graphics/Font.h index b981946..c879dce 100644 --- a/src/graphics/Font.h +++ b/src/graphics/Font.h @@ -1,10 +1,3 @@ -/* - * Font.h - * - * Created on: Aug 8, 2012 - * Author: holy - */ - #ifndef GRAPHICS_FONT_H_ #define GRAPHICS_FONT_H_ @@ -29,9 +22,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;