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
|
|
@ -4,16 +4,18 @@
|
|||
|
||||
Text::Text() :
|
||||
m_font (NULL),
|
||||
m_size (22),
|
||||
m_color (255, 255, 255, 255),
|
||||
m_outlineColor (0, 0, 0, 255),
|
||||
m_outlineWidth (0)
|
||||
{
|
||||
}
|
||||
|
||||
Text::Text(const std::string text, const Font& font) :
|
||||
m_font (&font),
|
||||
Text::Text(const std::string text, unsigned int size, const Font& font) :
|
||||
m_font (&font),
|
||||
m_size (size),
|
||||
m_string (text),
|
||||
m_color (255, 255, 255, 255),
|
||||
m_color (255, 255, 255, 255),
|
||||
m_outlineColor (0, 0, 0, 255),
|
||||
m_outlineWidth (0),
|
||||
m_geometryNeedsUpdate (true)
|
||||
|
|
@ -31,6 +33,17 @@ const std::string& Text::getString() const
|
|||
return m_string;
|
||||
}
|
||||
|
||||
void Text::setCharacterSize(unsigned int size)
|
||||
{
|
||||
m_size = size;
|
||||
m_geometryNeedsUpdate = true;
|
||||
}
|
||||
|
||||
unsigned int Text::getCharacteSize() const
|
||||
{
|
||||
return m_size;
|
||||
}
|
||||
|
||||
void Text::setFont(const Font& font)
|
||||
{
|
||||
m_font = &font;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue