InputAPI reference
Struct DeviceId
Namespace: MicroEngine.Input
Assembly: MicroEngine.Input.dll
Guide: Input
Identifies one input device for as long as it is connected: a keyboard, a mouse, a touch screen, one gamepad. Ids are chosen by whoever reports the device (a backend’s own ids are positive; the engine’s polled sources and touch screen use negative ones) and are never reused while the game runs.
public readonly struct DeviceId : IEquatable<DeviceId>Implements
Constructors
DeviceId(int)
Identifies one input device for as long as it is connected: a keyboard, a mouse, a touch screen, one gamepad. Ids are chosen by whoever reports the device (a backend’s own ids are positive; the engine’s polled sources and touch screen use negative ones) and are never reused while the game runs.
public DeviceId(int Value)Parameters
Value int
The id; 0 is None.
Properties
None
No device (scripted actions, sources that are not devices).
public static DeviceId None { get; }Property Value
TouchScreen
The touch screen the platform offers (its fingers become pointers of this device).
public static DeviceId TouchScreen { get; }Property Value
Value
The id; 0 is None.
public int Value { get; init; }Property Value
Methods
Deconstruct(out int)
public void Deconstruct(out int Value)Parameters
Value int
Equals(object)
public override bool Equals(object obj)Parameters
obj object
Returns
Equals(DeviceId)
public bool Equals(DeviceId other)Parameters
other DeviceId
Returns
GetHashCode()
public override int GetHashCode()Returns
ToString()
public override string ToString()Returns
Operators
operator ==(DeviceId, DeviceId)
public static bool operator ==(DeviceId left, DeviceId right)Parameters
left DeviceId
right DeviceId
Returns
operator !=(DeviceId, DeviceId)
public static bool operator !=(DeviceId left, DeviceId right)Parameters
left DeviceId
right DeviceId