InputAPI reference
Class InputDeviceInfo
Namespace: MicroEngine.Input
Assembly: MicroEngine.Input.dll
Guide: Input
A connected device as its backend describes it.
public sealed record InputDeviceInfo : IEquatable<InputDeviceInfo>Inheritance
Implements
Constructors
InputDeviceInfo(DeviceId, DeviceKind, string)
A connected device as its backend describes it.
public InputDeviceInfo(DeviceId Id, DeviceKind Kind, string Name)Parameters
Id DeviceId
Its id.
Kind DeviceKind
Keyboard, mouse, touch screen, gamepad or other.
Name string
The name the system reports (“Xbox Series X Controller”), or a generic one.
Properties
CanRumble
For gamepads: whether Rumble can do anything on it.
public bool CanRumble { get; init; }Property Value
Id
Its id.
public DeviceId Id { get; init; }Property Value
Kind
Keyboard, mouse, touch screen, gamepad or other.
public DeviceKind Kind { get; init; }Property Value
Name
The name the system reports (“Xbox Series X Controller”), or a generic one.
public string Name { get; init; }Property Value
PlayerIndex
For gamepads: the player number the system or the pad shows (its LEDs), 0-based, or -1 when it has none.
public int PlayerIndex { get; init; }Property Value
Style
For gamepads: the family whose names its buttons carry (Xbox when unknown).
public GamepadStyle Style { get; init; }Property Value
Methods
<Clone>$()
public InputDeviceInfo <Clone>$()Returns
Deconstruct(out DeviceId, out DeviceKind, out string)
public void Deconstruct(out DeviceId Id, out DeviceKind Kind, out string Name)Parameters
Id DeviceId
Kind DeviceKind
Name string
Equals(object?)
public override bool Equals(object? obj)Parameters
obj object?
Returns
Equals(InputDeviceInfo?)
public bool Equals(InputDeviceInfo? other)Parameters
other InputDeviceInfo?
Returns
GetHashCode()
public override int GetHashCode()Returns
ToString()
public override string ToString()Returns
Operators
operator ==(InputDeviceInfo?, InputDeviceInfo?)
public static bool operator ==(InputDeviceInfo? left, InputDeviceInfo? right)Parameters
left InputDeviceInfo?
right InputDeviceInfo?
Returns
operator !=(InputDeviceInfo?, InputDeviceInfo?)
public static bool operator !=(InputDeviceInfo? left, InputDeviceInfo? right)Parameters
left InputDeviceInfo?
right InputDeviceInfo?