keybinds for opening bag/belt & context logic for opening storage window (#22238)

* keybinds for opening bag/belt & context logic for opening storage window

* no error por favor
This commit is contained in:
Nemanja
2023-12-08 13:43:37 -05:00
committed by GitHub
parent dbdb9bc3ff
commit 736300d505
11 changed files with 118 additions and 25 deletions

View File

@@ -12,7 +12,6 @@ using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.Timing;
using Robust.Shared.Utility;
namespace Content.Client.UserInterface.Systems.Storage.Controls;
@@ -156,6 +155,15 @@ public sealed class StorageContainer : BaseWindow
{
Close();
};
exitButton.OnKeyBindDown += args =>
{
// it just makes sense...
if (!args.Handled && args.Function == ContentKeyFunctions.ActivateItemInWorld)
{
Close();
args.Handle();
}
};
var exitContainer = new BoxContainer
{
Children =
@@ -448,6 +456,6 @@ public sealed class StorageContainer : BaseWindow
if (StorageEntity == null)
return;
_entity.System<StorageSystem>().CloseStorageUI(StorageEntity.Value);
_entity.System<StorageSystem>().CloseStorageWindow(StorageEntity.Value);
}
}