37 lines
930 B
C#
37 lines
930 B
C#
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 += () =>
|
|
{
|
|
_inputMenu.Visible = true;
|
|
};
|
|
|
|
_quitButton.Pressed += () =>
|
|
{
|
|
GetTree().Paused = false;
|
|
GetTree().ChangeSceneToFile("res://scenes/ui/main_menu.tscn");
|
|
};
|
|
}
|
|
}
|