From acf4fd005b999c0ce6eec10e6ef2b94d43311841 Mon Sep 17 00:00:00 2001 From: Just Dzhi Date: Sat, 30 Sep 2023 19:56:06 +0400 Subject: [PATCH] window.gd script minimum window size & window title --- project.godot | 4 ++++ src/window.gd | 8 ++++++++ 2 files changed, 12 insertions(+) create mode 100644 src/window.gd diff --git a/project.godot b/project.godot index 9ca04f6..306ed25 100644 --- a/project.godot +++ b/project.godot @@ -19,11 +19,15 @@ config/icon="res://icon.png" [autoload] Global="*res://src/global.gd" +Window="*res://src/window.gd" [display] window/size/width=320 window/size/height=180 +window/size/test_width=1280 +window/size/test_height=720 +window/handheld/orientation="sensor_landscape" window/stretch/mode="viewport" window/stretch/aspect="keep" diff --git a/src/window.gd b/src/window.gd new file mode 100644 index 0000000..2f5768c --- /dev/null +++ b/src/window.gd @@ -0,0 +1,8 @@ +extends Node + +func _ready(): + _change_window_title("Hello World!") + OS.min_window_size = Vector2(320, 180) + +func _change_window_title(_title): + OS.set_window_title(ProjectSettings.get_setting("application/config/name") + " - " + _title)