Core/SimpleTextDrawer: Fix assignment operator
Former-commit-id: 52aa69ef0712d142ab36eae6dedf084c32a08012
This commit is contained in:
parent
b5fb11b5c2
commit
4619099a01
|
|
@ -41,7 +41,7 @@ namespace Nz
|
|||
void SetStyle(UInt32 style);
|
||||
void SetText(const String& str);
|
||||
|
||||
SimpleTextDrawer& operator=(const SimpleTextDrawer& drawer) = default;
|
||||
SimpleTextDrawer& operator=(const SimpleTextDrawer& drawer);
|
||||
SimpleTextDrawer& operator=(SimpleTextDrawer&& drawer);
|
||||
|
||||
static SimpleTextDrawer Draw(const String& str, unsigned int characterSize, UInt32 style = TextStyle_Regular, const Color& color = Color::White);
|
||||
|
|
|
|||
|
|
@ -144,6 +144,19 @@ namespace Nz
|
|||
m_glyphUpdated = false;
|
||||
}
|
||||
|
||||
SimpleTextDrawer& SimpleTextDrawer::operator=(const SimpleTextDrawer& drawer)
|
||||
{
|
||||
m_characterSize = drawer.m_characterSize;
|
||||
m_color = drawer.m_color;
|
||||
m_style = drawer.m_style;
|
||||
m_text = drawer.m_text;
|
||||
|
||||
m_glyphUpdated = false;
|
||||
SetFont(drawer.m_font);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
SimpleTextDrawer& SimpleTextDrawer::operator=(SimpleTextDrawer&& drawer)
|
||||
{
|
||||
DisconnectFontSlots();
|
||||
|
|
|
|||
Loading…
Reference in New Issue