aboutsummaryrefslogtreecommitdiff
path: root/extension/src/openvic-extension/utility/UITools.cpp
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2024-01-09 20:29:17 +0100
committer GitHub <noreply@github.com>2024-01-09 20:29:17 +0100
commite6c62c148924767bcc798b27af580bf9f18f724d (patch)
treea7b0df56cac7a87e039e1d489ea66e64b67ccf9c /extension/src/openvic-extension/utility/UITools.cpp
parentcf34ce1d7459ee91fc75e89835a8e7171fac636b (diff)
parent41d35fbecc9061720625cf2d6ef2b84a3a85272a (diff)
Merge pull request #187 from OpenVicProject/update-sim-ordered-map
Updated SIM submodule and switched to ordered_map
Diffstat (limited to 'extension/src/openvic-extension/utility/UITools.cpp')
-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 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<GUI::Element::orientation_t, Control::LayoutPreset> orientation_map {
+ static const ordered_map<GUI::Element::orientation_t, Control::LayoutPreset> 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<GUI::AlignedElement::format_t, HorizontalAlignment> format_map {
+ static const ordered_map<GUI::AlignedElement::format_t, HorizontalAlignment> 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<std::string_view, bool (*)(generate_gui_args_t&&)> type_map {
+ static const ordered_map<std::string_view, bool (*)(generate_gui_args_t&&)> type_map {
{ GUI::Icon::get_type_static(), &generate_icon },
{ GUI::Button::get_type_static(), &generate_button },
{ GUI::Checkbox::get_type_static(), &generate_checkbox },