1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-02-20 12:33:14 +00:00

Set the window's minimum size only once in Main.gd

This commit is contained in:
Emmanouil Papadeas 2024-02-23 20:24:37 +02:00
parent d3db8f5be7
commit 03ce5d40a2

View file

@ -119,15 +119,13 @@ func _setup_application_window_size() -> void:
var root := get_tree().root
root.content_scale_aspect = Window.CONTENT_SCALE_ASPECT_IGNORE
root.content_scale_mode = Window.CONTENT_SCALE_MODE_DISABLED
# Set a minimum window size to prevent UI elements from collapsing on each other.
root.min_size = Vector2(1024, 576)
root.content_scale_factor = Global.shrink
set_custom_cursor()
if OS.get_name() == "Web":
return
# Set a minimum window size to prevent UI elements from collapsing on each other.
get_window().min_size = Vector2(1024, 576)
# Restore the window position/size if values are present in the configuration cache
if Global.config_cache.has_section_key("window", "screen"):
get_window().current_screen = Global.config_cache.get_value("window", "screen")