Let the user close extra windows

This commit is contained in:
Zoey Kitt 2024-11-15 18:27:17 -06:00
parent 3080ca5b71
commit 82cc07f7dc
2 changed files with 10 additions and 1 deletions

View file

@ -0,0 +1,5 @@
extends Window
func _on_close_requested() -> void:
queue_free()

View file

@ -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"]