2025-04-23 01:16:21 +00:00
|
|
|
using Godot;
|
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
public partial class pause_menu : CenterContainer
|
|
|
|
|
{
|
|
|
|
|
private Button _resumeButton;
|
|
|
|
|
private Button _quitButton;
|
|
|
|
|
private Button _inputButton;
|
|
|
|
|
|
|
|
|
|
private input_menu _inputMenu;
|
|
|
|
|
|
|
|
|
|
public override void _Ready()
|
|
|
|
|
{
|
|
|
|
|
_resumeButton = GetNode<Button>("VBox/HBox/ResumeButton");
|
|
|
|
|
_quitButton = GetNode<Button>("VBox/HBox/QuitButton");
|
|
|
|
|
_inputButton = GetNode<Button>("VBox/HBox/InputsButton");
|
|
|
|
|
_inputMenu = GetNode<input_menu>("InputMenu");
|
|
|
|
|
|
|
|
|
|
_resumeButton.Pressed += () =>
|
|
|
|
|
{
|
|
|
|
|
Visible = false;
|
|
|
|
|
GetTree().Paused = false;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
_inputButton.Pressed += () =>
|
|
|
|
|
{
|
2025-04-24 10:30:55 +00:00
|
|
|
_inputMenu.ShowInputPanel();
|
2025-04-23 01:16:21 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
_quitButton.Pressed += () =>
|
|
|
|
|
{
|
|
|
|
|
GetTree().Paused = false;
|
2025-04-23 16:20:00 +00:00
|
|
|
GetTree().ChangeSceneToFile("res://scenes/ui/main_menu.tscn");
|
2025-04-23 01:16:21 +00:00
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|