Use new command binding system supporting multiple bindings (#1043)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
This commit is contained in:
@@ -24,6 +24,7 @@ using Robust.Client.Utility;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.GameObjects.Systems;
|
||||
using Robust.Shared.Input;
|
||||
using Robust.Shared.Input.Binding;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Timing;
|
||||
using Robust.Shared.IoC;
|
||||
@@ -65,9 +66,16 @@ namespace Content.Client.GameObjects.EntitySystems
|
||||
|
||||
IoCManager.InjectDependencies(this);
|
||||
|
||||
var input = EntitySystemManager.GetEntitySystem<InputSystem>();
|
||||
input.BindMap.BindFunction(ContentKeyFunctions.OpenContextMenu,
|
||||
new PointerInputCmdHandler(OnOpenContextMenu));
|
||||
CommandBinds.Builder
|
||||
.Bind(ContentKeyFunctions.OpenContextMenu,
|
||||
new PointerInputCmdHandler(OnOpenContextMenu))
|
||||
.Register<VerbSystem>();
|
||||
}
|
||||
|
||||
public override void Shutdown()
|
||||
{
|
||||
CommandBinds.Unregister<VerbSystem>();
|
||||
base.Shutdown();
|
||||
}
|
||||
|
||||
public void OpenContextMenu(IEntity entity, ScreenCoordinates screenCoordinates)
|
||||
|
||||
Reference in New Issue
Block a user