aboutsummaryrefslogtreecommitdiff
path: root/extension
diff options
context:
space:
mode:
author BrickPi <ajmach6@gmail.com>2024-11-14 04:05:46 +0100
committer BrickPi <ajmach6@gmail.com>2024-11-15 02:55:15 +0100
commit9960ccfd404f89fbc71a1d02796253503a483c23 (patch)
tree63fbfbfa6cce76b9a280772e4013428e8c52b546 /extension
parent7f7510cd3c3541b596d97eff8ade42e819d82c85 (diff)
Use V2 Minimap GUImapmode-panel
Diffstat (limited to 'extension')
-rw-r--r--extension/src/openvic-extension/utility/UITools.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/extension/src/openvic-extension/utility/UITools.cpp b/extension/src/openvic-extension/utility/UITools.cpp
index 4bd537d..ecb35a8 100644
--- a/extension/src/openvic-extension/utility/UITools.cpp
+++ b/extension/src/openvic-extension/utility/UITools.cpp
@@ -482,14 +482,18 @@ static bool generate_window(generate_gui_args_t&& args) {
GUI::Window const& window = static_cast<GUI::Window const&>(args.element);
- // TODO - moveable, fullscreen, dontRender (disable visibility?)
+ // TODO - moveable, dontRender (disable visibility?)
const String window_name = Utilities::std_to_godot_string(window.get_name());
Panel* godot_panel = nullptr;
bool ret = new_control(godot_panel, window, args.name);
ERR_FAIL_NULL_V_MSG(godot_panel, false, vformat("Failed to create Panel for GUI window %s", window_name));
- godot_panel->set_custom_minimum_size(Utilities::to_godot_fvec2(window.get_size()));
+ if (window.get_fullscreen()) {
+ godot_panel->set_anchors_preset(godot::Control::PRESET_FULL_RECT);
+ } else {
+ godot_panel->set_custom_minimum_size(Utilities::to_godot_fvec2(window.get_size()));
+ }
Ref<StyleBoxEmpty> stylebox_empty;
stylebox_empty.instantiate();