Class InputContext
- Namespace
- SimulationFramework.Input
- Assembly
- SimulationFramework.dll
Controls the input sent to a simulation.
public sealed class InputContext : ISimulationComponent, IDisposable
- Inheritance
-
InputContext
- Implements
- Inherited Members
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Initialize(MessageDispatcher)
Initializes the component. This is called once after the component is added to a simulation.
public void Initialize(MessageDispatcher dispatcher)
Parameters
dispatcher
MessageDispatcherThe simulation's MessageDispatcher. This can be used to listen for messages to be called back at a later frame.
SendChar(char)
emulates typing a character
public void SendChar(char keycode)
Parameters
keycode
char
UpdateGamepadButton(GamepadButton, bool)
Updates the state of a gamepad button.
public void UpdateGamepadButton(GamepadButton button, bool isDown)
Parameters
button
GamepadButtonisDown
bool
UpdateGamepadJoysticks(Vector2, Vector2)
Updates the state of the gamepad joysticks.
public void UpdateGamepadJoysticks(Vector2 rightJoystick, Vector2 leftJoystick)
Parameters
UpdateGamepadTriggers(float, float)
Updates the state of the gamepad triggers.
public void UpdateGamepadTriggers(float rightTrigger, float leftTrigger)
Parameters
UpdateKey(Key, bool)
Updates the state of the provided key.
public void UpdateKey(Key key, bool isDown)
Parameters
UpdateMouseButton(MouseButton, bool)
Updates the state of the provided mouse button.
public void UpdateMouseButton(MouseButton button, bool isDown)
Parameters
button
MouseButtonisDown
bool
UpdateMousePosition(Vector2)
Updates the mouse position.
public void UpdateMousePosition(Vector2 position)
Parameters
position
Vector2
UpdateMouseScroll(int)
Updates the mouse scroll wheel delta.
public void UpdateMouseScroll(int scrollDelta)
Parameters
scrollDelta
int