diff options
author | hop311 <hop3114@gmail.com> | 2024-08-23 01:03:02 +0200 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2024-08-23 01:03:02 +0200 |
commit | 95a6b95a5df63fa1bcb1d4680b3fdd7091a9c38e (patch) | |
tree | 7a487c2283eac8159ea0e25f93abdefa6b3ca0d1 /extension/src/openvic-extension/utility | |
parent | 7c85ab11e840c281a2499dcc6dd3219c33e7d37f (diff) |
Rework GUITextLabel to use custom text handling instead of RichTextLabel
Diffstat (limited to 'extension/src/openvic-extension/utility')
-rw-r--r-- | extension/src/openvic-extension/utility/UITools.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/extension/src/openvic-extension/utility/UITools.cpp b/extension/src/openvic-extension/utility/UITools.cpp index f972681..3fcc837 100644 --- a/extension/src/openvic-extension/utility/UITools.cpp +++ b/extension/src/openvic-extension/utility/UITools.cpp @@ -510,7 +510,11 @@ static bool generate_text(generate_gui_args_t&& args) { text_label->set_mouse_filter(Control::MOUSE_FILTER_IGNORE); - if (text_label->set_gui_text(&text) != OK) { + GameSingleton const* game_singleton = GameSingleton::get_singleton(); + GFX::Font::colour_codes_t const* override_colour_codes = game_singleton != nullptr + ? &game_singleton->get_definition_manager().get_ui_manager().get_universal_colour_codes() : nullptr; + + if (text_label->set_gui_text(&text, override_colour_codes) != OK) { UtilityFunctions::push_error("Error initialising GUITextLabel for GUI text ", text_name); ret = false; } |