aboutsummaryrefslogtreecommitdiff
path: root/extension/src/openvic-extension/utility
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2024-07-04 10:39:28 +0200
committer GitHub <noreply@github.com>2024-07-04 10:39:28 +0200
commit6797e64ce8179635d56b73b5b4783eca560cbf11 (patch)
tree0c06560ddae94550077c997f8b7e14f69057f236 /extension/src/openvic-extension/utility
parent5a35e5f511c6af55c63cc0303e05da2812ab21a8 (diff)
parentdb246d901d1ccd39b0ed3fc024f28ad7b6b4848b (diff)
Merge pull request #235 from OpenVicProject/instance-definition-managers
Update to use SIM Instance and Definition Managers
Diffstat (limited to 'extension/src/openvic-extension/utility')
-rw-r--r--extension/src/openvic-extension/utility/UITools.cpp6
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));