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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user