carotrauma/scenes/title/QuitButton.cs

16 lines
269 B
C#
Raw Normal View History

2024-05-27 19:42:11 +01:00
using Godot;
using System;
public partial class QuitButton : Button
{
// Called when the node enters the scene tree for the first time.
public override void _Ready() {
Text = "Quit";
Pressed += OnPressed;
}
private void OnPressed() {
GetTree().Quit();
}
}