Files
tbd-station-14/Content.Client/Input/ContentContexts.cs
Pieter-Jan Briers b0f212bad5 Verbs (#124)
Right click verbs work.
2018-11-21 20:58:11 +01:00

35 lines
1.4 KiB
C#

using Content.Shared.Input;
using SS14.Shared.Input;
namespace Content.Client.Input
{
/// <summary>
/// Contains a helper function for setting up all content
/// contexts, and modifying existing engine ones.
/// </summary>
public static class ContentContexts
{
public static void SetupContexts(IInputContextContainer contexts)
{
var human = contexts.GetContext("human");
human.AddFunction(ContentKeyFunctions.SwapHands);
human.AddFunction(ContentKeyFunctions.Drop);
human.AddFunction(ContentKeyFunctions.ActivateItemInHand);
human.AddFunction(ContentKeyFunctions.OpenCharacterMenu);
human.AddFunction(ContentKeyFunctions.ExamineEntity);
human.AddFunction(ContentKeyFunctions.UseItemInHand);
human.AddFunction(ContentKeyFunctions.ActivateItemInWorld);
human.AddFunction(ContentKeyFunctions.ThrowItemInHand);
human.AddFunction(ContentKeyFunctions.OpenContextMenu);
var ghost = contexts.New("ghost", "common");
ghost.AddFunction(EngineKeyFunctions.MoveUp);
ghost.AddFunction(EngineKeyFunctions.MoveDown);
ghost.AddFunction(EngineKeyFunctions.MoveLeft);
ghost.AddFunction(EngineKeyFunctions.MoveRight);
ghost.AddFunction(EngineKeyFunctions.Run);
ghost.AddFunction(ContentKeyFunctions.OpenContextMenu);
}
}
}