InputAPI reference
Struct PointerInfo
Namespace: MicroEngine.Input
Assembly: MicroEngine.Input.dll
Guide: Input
A pointer the game can read: the mouse while it is over the window, or a finger or pen on the screen.
public readonly struct PointerInfo : IEquatable<PointerInfo>Implements
Constructors
PointerInfo(DeviceId, long, PointerKind, Vector2, bool)
A pointer the game can read: the mouse while it is over the window, or a finger or pen on the screen.
public PointerInfo(DeviceId Device, long Id, PointerKind Kind, Vector2 Position, bool Down)Parameters
Device DeviceId
The device it belongs to.
Id long
0 for the mouse, the finger’s id for touches.
Kind PointerKind
Mouse, touch or pen.
Position Vector2
Where it is, in virtual canvas pixels.
Down bool
Whether its primary button is held (a finger or pen is always down while it touches). Also true in the update after a press that started and ended within one frame, so a quick tap is never lost.
Properties
Device
The device it belongs to.
public DeviceId Device { get; init; }Property Value
Down
Whether its primary button is held (a finger or pen is always down while it touches). Also true in the update after a press that started and ended within one frame, so a quick tap is never lost.
public bool Down { get; init; }Property Value
Id
0 for the mouse, the finger’s id for touches.
public long Id { get; init; }Property Value
Kind
Mouse, touch or pen.
public PointerKind Kind { get; init; }Property Value
Position
Where it is, in virtual canvas pixels.
public Vector2 Position { get; init; }Property Value
Methods
Deconstruct(out DeviceId, out long, out PointerKind, out Vector2, out bool)
public void Deconstruct(out DeviceId Device, out long Id, out PointerKind Kind, out Vector2 Position, out bool Down)Parameters
Device DeviceId
Id long
Kind PointerKind
Position Vector2
Down bool
Equals(object)
public override bool Equals(object obj)Parameters
obj object
Returns
Equals(PointerInfo)
public bool Equals(PointerInfo other)Parameters
other PointerInfo
Returns
GetHashCode()
public override int GetHashCode()Returns
ToString()
public override string ToString()Returns
Operators
operator ==(PointerInfo, PointerInfo)
public static bool operator ==(PointerInfo left, PointerInfo right)Parameters
left PointerInfo
right PointerInfo
Returns
operator !=(PointerInfo, PointerInfo)
public static bool operator !=(PointerInfo left, PointerInfo right)Parameters
left PointerInfo
right PointerInfo