diff options
| -rw-r--r-- | Scenes/Texty.tscn | 2 | ||||
| -rw-r--r-- | Scripts/Texty.cs | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/Scenes/Texty.tscn b/Scenes/Texty.tscn index 7b46cf4..ae49f97 100644 --- a/Scenes/Texty.tscn +++ b/Scenes/Texty.tscn @@ -11,3 +11,5 @@ script = ExtResource( 3 ) visible = false [node name="StartMenu" parent="." instance=ExtResource( 2 )] + +[connection signal="QuitGame" from="StartMenu" to="." method="OnQuitGame"] diff --git a/Scripts/Texty.cs b/Scripts/Texty.cs index 8497f29..0a72c70 100644 --- a/Scripts/Texty.cs +++ b/Scripts/Texty.cs @@ -14,6 +14,11 @@ namespace Texty.Scripts StartMenu = GetNode<StartMenu>(nameof(StartMenu)); } + public void OnQuitGame() + { + GetTree().Notification(MainLoop.NotificationWmQuitRequest); + } + } } |
