diff --git a/include/Nazara/Utility/SimpleTextDrawer.hpp b/include/Nazara/Utility/SimpleTextDrawer.hpp index 2d2709679..22b52f293 100644 --- a/include/Nazara/Utility/SimpleTextDrawer.hpp +++ b/include/Nazara/Utility/SimpleTextDrawer.hpp @@ -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); diff --git a/src/Nazara/Utility/SimpleTextDrawer.cpp b/src/Nazara/Utility/SimpleTextDrawer.cpp index 842f8ed20..6f7393dd9 100644 --- a/src/Nazara/Utility/SimpleTextDrawer.cpp +++ b/src/Nazara/Utility/SimpleTextDrawer.cpp @@ -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();