Fix right click not showing the context menu in AHelps, players tab and objects tab (#22798)
* Fix right clicks in AHelp window * Fix player tab right click * Fix objects tab right click
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
using Content.Client.Station;
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.UserInterface;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Client.UserInterface.XAML;
|
||||
using Robust.Shared.Map.Components;
|
||||
|
||||
@@ -15,7 +14,7 @@ public sealed partial class ObjectsTab : Control
|
||||
private readonly List<ObjectsTabEntry> _objects = new();
|
||||
private List<ObjectsTabSelection> _selections = new();
|
||||
|
||||
public event Action<BaseButton.ButtonEventArgs>? OnEntryPressed;
|
||||
public event Action<ObjectsTabEntry, GUIBoundKeyEventArgs>? OnEntryKeyBindDown;
|
||||
|
||||
public ObjectsTab()
|
||||
{
|
||||
@@ -82,7 +81,7 @@ public sealed partial class ObjectsTab : Control
|
||||
var ctrl = new ObjectsTabEntry(name, entity);
|
||||
_objects.Add(ctrl);
|
||||
ObjectList.AddChild(ctrl);
|
||||
ctrl.OnPressed += args => OnEntryPressed?.Invoke(args);
|
||||
ctrl.OnKeyBindDown += args => OnEntryKeyBindDown?.Invoke(ctrl, args);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user