diff options
author | Zoey Kitt <zoey.kitt@outlook.com> | 2024-11-15 18:27:17 -0600 |
---|---|---|
committer | Zoey Kitt <zoey.kitt@outlook.com> | 2024-11-15 18:27:17 -0600 |
commit | 82cc07f7dc13b391c085cb66125c1f35583d5788 (patch) | |
tree | fc490926a591ec8c64dbb6c8f90dae92aa237745 /scenes | |
parent | 3080ca5b71cf387b5d8c6cb969470edee39ee367 (diff) |
Let the user close extra windows
Diffstat (limited to 'scenes')
-rw-r--r-- | scenes/closable_window.gd | 5 | ||||
-rw-r--r-- | scenes/main.tscn | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/scenes/closable_window.gd b/scenes/closable_window.gd new file mode 100644 index 0000000..97e1e03 --- /dev/null +++ b/scenes/closable_window.gd @@ -0,0 +1,5 @@ +extends Window + + +func _on_close_requested() -> void: + queue_free() diff --git a/scenes/main.tscn b/scenes/main.tscn index aff1610..5a4640f 100644 --- a/scenes/main.tscn +++ b/scenes/main.tscn @@ -1,6 +1,7 @@ -[gd_scene load_steps=3 format=3 uid="uid://d06d1vihf2oqp"] +[gd_scene load_steps=4 format=3 uid="uid://d06d1vihf2oqp"] [ext_resource type="Texture2D" uid="uid://b03ygtrwha22g" path="res://taytay/IMG_5199.jpeg" id="1_o2s48"] +[ext_resource type="Script" path="res://scenes/closable_window.gd" id="2_2mdl3"] [ext_resource type="PackedScene" uid="uid://baukkysebggup" path="res://scenes/window_mvp.tscn" id="2_ls66h"] [node name="Node2D" type="Node2D"] @@ -17,5 +18,8 @@ size = Vector2i(1280, 720) content_scale_size = Vector2i(1280, 720) content_scale_mode = 1 content_scale_aspect = 1 +script = ExtResource("2_2mdl3") [node name="WindowMvp" parent="Window" instance=ExtResource("2_ls66h")] + +[connection signal="close_requested" from="Window" to="Window" method="_on_close_requested"] |