Fix debug and info text being the wrong color
authorrubenwardy <rw@rubenwardy.com>
Sun, 5 Aug 2018 22:14:24 +0000 (23:14 +0100)
committerrubenwardy <rw@rubenwardy.com>
Sun, 5 Aug 2018 22:16:05 +0000 (23:16 +0100)
Fixes #7623

src/irrlicht_changes/static_text.h

index c15bf869a12c6c44c1caf48172f308c193a0af1b..43c5872845e61bd75bf02cb88fab2afb951145e9 100644 (file)
@@ -274,7 +274,10 @@ inline void setStaticText(irr::gui::IGUIStaticText *static_text, const EnrichedS
 
 inline void setStaticText(irr::gui::IGUIStaticText *static_text, const wchar_t *text)
 {
-       setStaticText(static_text, EnrichedString(text, static_text->getOverrideColor()));
+       auto color = static_text->isOverrideColorEnabled()
+                                    ? static_text->getOverrideColor()
+                                    : irr::video::SColor(255, 255, 255, 255);
+       setStaticText(static_text, EnrichedString(text, color));
 }
 
 #endif // _IRR_COMPILE_WITH_GUI_