Quit the game
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
extends Node
|
||||||
|
|
||||||
|
# Quit the game
|
||||||
|
func _on_Quit_pressed():
|
||||||
|
get_tree().quit(0)
|
||||||
+13
-2
@@ -1,6 +1,14 @@
|
|||||||
[gd_scene format=2]
|
[gd_scene load_steps=3 format=2]
|
||||||
|
|
||||||
[node name="Main" type="Node2D"]
|
[ext_resource path="res://scenes/main.gd" type="Script" id=1]
|
||||||
|
|
||||||
|
[sub_resource type="GDScript" id=1]
|
||||||
|
script/source = "extends LinkButton
|
||||||
|
|
||||||
|
# Quit the game with properly exit code"
|
||||||
|
|
||||||
|
[node name="Main" type="Node"]
|
||||||
|
script = ExtResource( 1 )
|
||||||
|
|
||||||
[node name="Grid" type="GridContainer" parent="."]
|
[node name="Grid" type="GridContainer" parent="."]
|
||||||
margin_left = -1.33484
|
margin_left = -1.33484
|
||||||
@@ -40,3 +48,6 @@ margin_top = 72.0
|
|||||||
margin_right = 151.0
|
margin_right = 151.0
|
||||||
margin_bottom = 86.0
|
margin_bottom = 86.0
|
||||||
text = "Quitter"
|
text = "Quitter"
|
||||||
|
script = SubResource( 1 )
|
||||||
|
|
||||||
|
[connection signal="pressed" from="Grid/Quit" to="." method="_on_Quit_pressed"]
|
||||||
|
|||||||
Reference in New Issue
Block a user