Font: moving text size from font to Text object.
This commit is contained in:
parent
c74dda1200
commit
b2dbee33fb
5 changed files with 31 additions and 16 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue