mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 11:15:33 +00:00
Inventory close and open by button
This commit is contained in:
parent
0687b6de99
commit
80a13d047d
11 changed files with 165 additions and 53 deletions
|
|
@ -4,6 +4,9 @@ namespace Cirno.Scripts.UI;
|
|||
|
||||
public partial class PauseMenu : Control
|
||||
{
|
||||
[Export]
|
||||
public string PauseActionName = "pause";
|
||||
|
||||
[ExportGroup("Scenes")]
|
||||
[Export]
|
||||
public string MainMenuScene { get; private set; }
|
||||
|
|
@ -11,13 +14,13 @@ public partial class PauseMenu : Control
|
|||
[ExportGroup("Buttons")]
|
||||
[Export]
|
||||
public Button ResumeButton { get; private set; }
|
||||
[ExportGroup("Buttons")]
|
||||
|
||||
[Export]
|
||||
public Button QuitButton { get; private set; }
|
||||
[ExportGroup("Buttons")]
|
||||
|
||||
[Export]
|
||||
public Button OptionsButton { get; private set; }
|
||||
[ExportGroup("Buttons")]
|
||||
|
||||
[Export]
|
||||
public Button DebugButton { get; private set; }
|
||||
|
||||
|
|
@ -36,6 +39,14 @@ public partial class PauseMenu : Control
|
|||
DebugButton.Pressed += DebugButtonOnPressed;
|
||||
}
|
||||
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
if (_gameManager.GameState == GameState.Paused && Input.IsActionJustPressed(PauseActionName))
|
||||
{
|
||||
_gameManager.Unpause();
|
||||
}
|
||||
}
|
||||
|
||||
private void DebugButtonOnPressed()
|
||||
{
|
||||
EmitSignal(SignalName.SpawnDebugMenu);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue