Block on events where the inventory will close after, block in general to prevent inventory scrolling during inventory message display

This commit is contained in:
2026-03-03 18:59:09 -08:00
parent 7b6ca68e65
commit ff82f51451
2 changed files with 21 additions and 4 deletions

View File

@@ -81,6 +81,12 @@ public partial class InventoryMenu : Control, IInventoryMenu
public override void _Input(InputEvent @event)
{
if (_blocking)
{
GetViewport().SetInputAsHandled();
return;
}
var validSelectableItems = _player.Inventory.Items.ToList();
if (Input.IsActionJustPressed(GameInputs.MoveUp) && _currentlySelected != null && _currentlySelected.Item.Value != validSelectableItems.First())