From cec04970d1b8a91b33f9a73f86c92972780dd49b Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Sat, 14 Sep 2019 19:02:29 +0200 Subject: [PATCH] Define a minimum window size when supported This prevents UI elements from collapsing when resizing the window. --- Scripts/Main.gd | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Scripts/Main.gd b/Scripts/Main.gd index 240bdfa90..50262c83a 100644 --- a/Scripts/Main.gd +++ b/Scripts/Main.gd @@ -14,6 +14,10 @@ var animation_forward := true # Called when the node enters the scene tree for the first time. func _ready() -> void: + # Set a minimum window size to prevent UI elements from collapsing on each other. + # This property is only available in 3.2alpha or later, so use `set()` to fail gracefully if it doesn't exist. + OS.set("min_window_size", Vector2(1024, 600)) + var file_menu_items := { "New..." : KEY_MASK_CTRL + KEY_N, #The import and export key shortcuts will change,