diff options
author | hop311 <hop3114@gmail.com> | 2023-12-23 19:26:05 +0100 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2023-12-23 19:26:05 +0100 |
commit | 8a33982e543b7fb8c09be90ebadb33fe7f99b52f (patch) | |
tree | 0fb82e22b383996606ef6adc3e92c42d85bc6777 /src/openvic-simulation/interface/GUI.cpp | |
parent | 14e47d58b85f657ec1fed8abf88219f09bd3efbb (diff) |
Fixed TGC compatibility + misc cleanup
Diffstat (limited to 'src/openvic-simulation/interface/GUI.cpp')
-rw-r--r-- | src/openvic-simulation/interface/GUI.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/openvic-simulation/interface/GUI.cpp b/src/openvic-simulation/interface/GUI.cpp index 244909e..23a577c 100644 --- a/src/openvic-simulation/interface/GUI.cpp +++ b/src/openvic-simulation/interface/GUI.cpp @@ -93,7 +93,9 @@ bool BaseButton::_fill_key_map(NodeTools::key_map_t& key_map, UIManager const& u bool ret = Element::_fill_key_map(key_map, ui_manager); // look up sprite registry for texture sprite with name... ret &= add_key_map_entries(key_map, - "quadTextureSprite", ONE_EXACTLY, + "quadTextureSprite", ZERO_OR_ONE, + expect_string(ui_manager.expect_sprite_str(assign_variable_callback_pointer(sprite)), true), + "spriteType", ZERO_OR_ONE, expect_string(ui_manager.expect_sprite_str(assign_variable_callback_pointer(sprite)), true), "shortcut", ZERO_OR_ONE, success_callback // TODO - load and use shortcuts (how to integrate with custom keybinds?) ); @@ -160,7 +162,7 @@ bool OverlappingElementsBox::_fill_key_map(NodeTools::key_map_t& key_map, UIMana bool ret = AlignedElement::_fill_key_map(key_map, ui_manager); ret &= add_key_map_entries(key_map, "size", ONE_EXACTLY, expect_fvec2(assign_variable_callback(size)), - "spacing", ONE_EXACTLY, success_callback + "spacing", ONE_EXACTLY, expect_fixed_point(assign_variable_callback(spacing)) ); return ret; } |