Add more floors, light refactoring

This commit is contained in:
2025-02-12 00:49:16 -08:00
parent 9352e4c0fd
commit a1c66df038
31 changed files with 422 additions and 186 deletions

View File

@@ -11,6 +11,8 @@ public interface IInventoryMenu : IControl
{
public Task RedrawInventory();
public Task ShowMessage(string message);
event InventoryMenu.ClosedMenuEventHandler ClosedMenu;
}
@@ -93,16 +95,15 @@ public partial class InventoryMenu : Control, IInventoryMenu
Player.Inventory.EquippedArmor.Sync += EquippedArmor_Sync;
Player.Inventory.EquippedAccessory.Sync += EquippedAccessory_Sync;
Game.StatRaisedAlert += Game_StatRaisedAlert;
SetProcessInput(false);
}
private async void Game_StatRaisedAlert(string statRaisedAlert)
public async Task ShowMessage(string message)
{
SetProcessInput(false);
await HideUserActionPrompt();
await ShowInventoryInfo();
ItemEffectLabel.Text = statRaisedAlert;
ItemEffectLabel.Text = message;
await ToSignal(GetTree().CreateTimer(1f), "timeout");
await RedrawInventory();
SetProcessInput(true);