1
0
Fork 0

Font: moving text size from font to Text object.

This commit is contained in:
Henrik Hautakoski 2016-05-05 11:04:54 +02:00
parent c74dda1200
commit b2dbee33fb
5 changed files with 31 additions and 16 deletions

View file

@ -30,11 +30,14 @@ public :
Text();
Text(const std::string text, const Font& font);
Text(const std::string text, unsigned int size, const Font& font);
void setString(const std::string& string);
const std::string& getString() const;
void setCharacterSize(unsigned int size);
unsigned int getCharacteSize() const;
void setFont(const Font& font);
const Font* getFont() const;
@ -66,6 +69,9 @@ private :
// String containing the text.
std::string m_string;
// Character size (in pixels, not points).
unsigned int m_size;
const Font* m_font;
Color m_color;