diff options
author | hop311 <hop3114@gmail.com> | 2024-06-13 00:34:06 +0200 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2024-06-13 21:26:35 +0200 |
commit | db246d901d1ccd39b0ed3fc024f28ad7b6b4848b (patch) | |
tree | 0c06560ddae94550077c997f8b7e14f69057f236 /extension/src/openvic-extension/utility/UITools.cpp | |
parent | 72ae774f249fb408d5a3e3de09695c251906a7cc (diff) |
Updated SIM to use separate Instance and Definition Managersinstance-definition-managers
Diffstat (limited to 'extension/src/openvic-extension/utility/UITools.cpp')
-rw-r--r-- | extension/src/openvic-extension/utility/UITools.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/extension/src/openvic-extension/utility/UITools.cpp b/extension/src/openvic-extension/utility/UITools.cpp index 6a9384b..53f17b9 100644 --- a/extension/src/openvic-extension/utility/UITools.cpp +++ b/extension/src/openvic-extension/utility/UITools.cpp @@ -32,7 +32,7 @@ using OpenVic::Utilities::std_view_to_godot_string_name; GFX::Sprite const* UITools::get_gfx_sprite(godot::String const& gfx_sprite) { GameSingleton* game_singleton = GameSingleton::get_singleton(); ERR_FAIL_NULL_V(game_singleton, nullptr); - GFX::Sprite const* sprite = game_singleton->get_game_manager().get_ui_manager().get_sprite_by_identifier( + GFX::Sprite const* sprite = game_singleton->get_definition_manager().get_ui_manager().get_sprite_by_identifier( godot_to_std_string(gfx_sprite) ); ERR_FAIL_NULL_V_MSG(sprite, nullptr, vformat("GFX sprite not found: %s", gfx_sprite)); @@ -43,7 +43,7 @@ GUI::Element const* UITools::get_gui_element(godot::String const& gui_scene, god GameSingleton const* game_singleton = GameSingleton::get_singleton(); ERR_FAIL_NULL_V(game_singleton, nullptr); GUI::Scene const* scene = - game_singleton->get_game_manager().get_ui_manager().get_scene_by_identifier(godot_to_std_string(gui_scene)); + game_singleton->get_definition_manager().get_ui_manager().get_scene_by_identifier(godot_to_std_string(gui_scene)); ERR_FAIL_NULL_V_MSG(scene, nullptr, vformat("Failed to find GUI scene %s", gui_scene)); GUI::Element const* element = scene->get_scene_element_by_identifier(godot_to_std_string(gui_element)); ERR_FAIL_NULL_V_MSG(element, nullptr, vformat("Failed to find GUI element %s in GUI scene %s", gui_element, gui_scene)); @@ -54,7 +54,7 @@ GUI::Position const* UITools::get_gui_position(String const& gui_scene, String c GameSingleton const* game_singleton = GameSingleton::get_singleton(); ERR_FAIL_NULL_V(game_singleton, nullptr); GUI::Scene const* scene = - game_singleton->get_game_manager().get_ui_manager().get_scene_by_identifier(godot_to_std_string(gui_scene)); + game_singleton->get_definition_manager().get_ui_manager().get_scene_by_identifier(godot_to_std_string(gui_scene)); ERR_FAIL_NULL_V_MSG(scene, nullptr, vformat("Failed to find GUI scene %s", gui_scene)); GUI::Position const* position = scene->get_scene_position_by_identifier(godot_to_std_string(gui_position)); ERR_FAIL_NULL_V_MSG(position, nullptr, vformat("Failed to find GUI position %s in GUI scene %s", gui_position, gui_scene)); |