Add Context Menu to Bwoink Window (#9374)
* Clean up EntityListDisplay * Rename EntityListDisplay to ListContainer * Rename stuff * Rework ListContainer * Add tests * Replace IControlData with record ListData * Make _data non-nullable * Fix test record items being duplicates * Split filter method from populate * Rename UpdateList to DirtyList * Replace _count with _data.Count * Clarify local variable toRemove * Cleanup * Add data selection to ListContainer * Add selection test * Fix comments and test name * Fix ListContainer layout hiding items when scaled * Add test for ListContainer top item * Toggle fix * Ensure buttons are re-generated * Update unread count on select * a * Fix toggle test Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>
This commit is contained in:
@@ -4,6 +4,8 @@ using Robust.Client.GameObjects;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Shared.Input;
|
||||
using Content.Client.Items.Managers;
|
||||
using Content.Client.UserInterface.Controls;
|
||||
using JetBrains.Annotations;
|
||||
using static Content.Shared.Storage.SharedStorageComponent;
|
||||
|
||||
namespace Content.Client.Storage
|
||||
@@ -39,8 +41,10 @@ namespace Content.Client.Storage
|
||||
}
|
||||
}
|
||||
|
||||
public void InteractWithItem(BaseButton.ButtonEventArgs args, EntityUid entity)
|
||||
public void InteractWithItem(BaseButton.ButtonEventArgs args, ListData cData)
|
||||
{
|
||||
if (cData is not EntityListData {Uid: var entity})
|
||||
return;
|
||||
if (args.Event.Function == EngineKeyFunctions.UIClick)
|
||||
{
|
||||
SendMessage(new StorageInteractWithItemEvent(entity));
|
||||
|
||||
Reference in New Issue
Block a user