InputAPI reference
Interface IInputSource
Namespace: MicroEngine.Input
Assembly: MicroEngine.Input.dll
Guide: Input
The raw device state a backend reports once per polled frame.
public interface IInputSourceRemarks
Engine backends deliver events instead (IInputBackend); a polled source is still read every frame and its changes become the same events, so a host’s extra source or a test’s hand-set input is one more device.
Properties
LeftStick
Left stick, each axis in -1..1.
Vector2 LeftStick { get; }Property Value
PadConnected
Whether a gamepad is connected. Sources without gamepads keep the default.
bool PadConnected { get; }Property Value
PadStyle
The family of the connected gamepad, for button names in prompts; sources that cannot tell keep Xbox.
GamepadStyle PadStyle { get; }Property Value
Pointer
The mouse over the virtual canvas; sources without one keep the default (not present).
PointerState Pointer { get; }Property Value
Pointers
Every pointer: the mouse while over the window, each finger or pen on the screen. Sources without pointers keep the default (none).
IReadOnlyList<PointerInfo> Pointers { get; }Property Value
Methods
GetPadAxis(PadAxis)
Any gamepad axis. Sources that only know the left stick keep the default.
float GetPadAxis(PadAxis axis)Parameters
axis PadAxis
Returns
IsKeyDown(Key)
Whether key is held.
bool IsKeyDown(Key key)Parameters
key Key
Returns
IsPadDown(PadButton)
Whether button is held on the gamepad.
bool IsPadDown(PadButton button)Parameters
button PadButton