Add Resume/Exit buttons to pause menu, handle logic for returning to main menu and starting a new game
This commit is contained in:
@@ -100,7 +100,7 @@ public partial class InventoryMenu : Control, IInventoryMenu
|
||||
SfxDatabase.Instance.Play(SoundEffect.MoveUI);
|
||||
}
|
||||
|
||||
public override void _Input(InputEvent @event)
|
||||
public override void _UnhandledInput(InputEvent @event)
|
||||
{
|
||||
if (!Visible)
|
||||
return;
|
||||
@@ -108,12 +108,6 @@ public partial class InventoryMenu : Control, IInventoryMenu
|
||||
if ((!Input.IsActionJustPressed(GameInputs.UiUp) && Input.IsActionPressed(GameInputs.UiUp)) || (!Input.IsActionJustPressed(GameInputs.UiDown) && Input.IsActionPressed(GameInputs.UiDown)))
|
||||
AcceptEvent();
|
||||
|
||||
if (Input.IsActionJustPressed(GameInputs.Inventory) && !(UseButton.HasFocus() || DropButton.HasFocus() || ThrowButton.HasFocus()))
|
||||
{
|
||||
SfxDatabase.Instance.Play(SoundEffect.CancelUI);
|
||||
AcceptEvent();
|
||||
_gameRepo.CloseInventory();
|
||||
}
|
||||
if (Input.IsActionJustPressed(GameInputs.UiCancel) && (UseButton.HasFocus() || DropButton.HasFocus() || ThrowButton.HasFocus()))
|
||||
{
|
||||
SfxDatabase.Instance.Play(SoundEffect.CancelUI);
|
||||
@@ -153,6 +147,7 @@ public partial class InventoryMenu : Control, IInventoryMenu
|
||||
}
|
||||
else
|
||||
{
|
||||
SfxDatabase.Instance.Play(SoundEffect.CancelUI);
|
||||
_enableMenuSound = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user