SCRIPTING API / Time, input and debug / InputControl
InputControl
One physical control (key, mouse button, gamepad button or axis, mouse motion or wheel axis) with the modifier keys it requires.
Kindrecord struct
NamespaceKroys.EngineScripting
Members8
Source
InputTypes.csDECLARATION
Declaration
Namespace Kroys.EngineScripting.
Declaration
public readonly record struct InputControl(InputDevice Device, int Code, InputModifiers Modifiers = InputModifiers.None)
REFERENCE
Members
Constructors
#public InputControl(InputDevice Device, int Code, InputModifiers Modifiers = InputModifiers.None)One physical control (key, mouse button, gamepad button or axis, mouse motion or wheel axis) with the modifier keys it requires.
- Device
- The kind of control.
- Code
- The key, button or axis code on that device.
- Modifiers
- Modifier keys that must be held.
Properties
#public InputDevice Device { get; init; }The kind of control.
#public int Code { get; init; }The key, button or axis code on that device.
#public InputModifiers Modifiers { get; init; }Modifier keys that must be held.
Methods
#public static InputControl Key(KeyCode key, InputModifiers modifiers = InputModifiers.None)A keyboard key, optionally with modifiers (for example Ctrl+S).
#public static InputControl Mouse(MouseButton button, InputModifiers modifiers = InputModifiers.None)A mouse button.
#public static InputControl Gamepad(GamepadButton button)A gamepad button.
#public static InputControl Axis(GamepadAxis axis)A gamepad stick or trigger axis.
Signatures
public InputControl(InputDevice Device, int Code, InputModifiers Modifiers = InputModifiers.None) public InputDevice Device { get; init; } public int Code { get; init; } public InputModifiers Modifiers { get; init; } public static InputControl Key(KeyCode key, InputModifiers modifiers = InputModifiers.None) public static InputControl Mouse(MouseButton button, InputModifiers modifiers = InputModifiers.None) public static InputControl Gamepad(GamepadButton button) public static InputControl Axis(GamepadAxis axis)
KroysEngine 0.1.0 documentation, built from the engine repository by Tools/BuildDocsSite.py.