From 41d35fbecc9061720625cf2d6ef2b84a3a85272a Mon Sep 17 00:00:00 2001 From: hop311 Date: Mon, 8 Jan 2024 22:20:46 +0000 Subject: Updated SIM submodule and switched to ordered_map --- extension/src/openvic-extension/utility/UITools.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'extension/src/openvic-extension/utility/UITools.cpp') diff --git a/extension/src/openvic-extension/utility/UITools.cpp b/extension/src/openvic-extension/utility/UITools.cpp index 409a3ba..e1cd873 100644 --- a/extension/src/openvic-extension/utility/UITools.cpp +++ b/extension/src/openvic-extension/utility/UITools.cpp @@ -71,7 +71,7 @@ static T* new_control(GUI::Element const& element, String const& name) { using enum GUI::Element::orientation_t; using enum Control::LayoutPreset; - static const std::map orientation_map { + static const ordered_map orientation_map { { UPPER_LEFT, PRESET_TOP_LEFT }, { LOWER_LEFT, PRESET_BOTTOM_LEFT }, { LOWER_RIGHT, PRESET_BOTTOM_RIGHT }, { UPPER_RIGHT, PRESET_TOP_RIGHT }, { CENTER, PRESET_CENTER } @@ -400,7 +400,7 @@ static bool generate_text(generate_gui_args_t&& args) { godot_label->set_custom_minimum_size(Utilities::to_godot_fvec2(text.get_max_size())); using enum GUI::AlignedElement::format_t; - static const std::map format_map { + static const ordered_map format_map { { left, HORIZONTAL_ALIGNMENT_LEFT }, { centre, HORIZONTAL_ALIGNMENT_CENTER }, { right, HORIZONTAL_ALIGNMENT_RIGHT } @@ -495,7 +495,7 @@ static bool generate_window(generate_gui_args_t&& args) { static bool generate_element(GUI::Element const* element, String const& name, AssetManager& asset_manager, Control*& result) { ERR_FAIL_NULL_V(element, false); - static const std::map type_map { + static const ordered_map type_map { { GUI::Icon::get_type_static(), &generate_icon }, { GUI::Button::get_type_static(), &generate_button }, { GUI::Checkbox::get_type_static(), &generate_checkbox }, -- cgit v1.2.3-56-ga3b1