InputAPI reference
Struct PointerState
Namespace: MicroEngine.Input
Assembly: MicroEngine.Input.dll
Guide: Input
The mouse (or another pointer) over the game’s virtual canvas.
public readonly struct PointerState : IEquatable<PointerState>Implements
Constructors
PointerState(bool, Vector2, bool, bool, bool)
The mouse (or another pointer) over the game’s virtual canvas.
public PointerState(bool Present, Vector2 Position, bool Primary, bool Secondary, bool Middle)Parameters
Present bool
Whether the pointer is over the window at all.
Position Vector2
Position in virtual canvas pixels (may lie outside the canvas, in the letterbox).
Primary bool
Secondary bool
Middle bool
Properties
Middle
public bool Middle { get; init; }Property Value
Position
Position in virtual canvas pixels (may lie outside the canvas, in the letterbox).
public Vector2 Position { get; init; }Property Value
Present
Whether the pointer is over the window at all.
public bool Present { get; init; }Property Value
Primary
public bool Primary { get; init; }Property Value
Secondary
public bool Secondary { get; init; }Property Value
Wheel
How far the wheel turned since the previous update: Y positive away from the player (scroll up), X positive to the right, in notches (fractions for smooth wheels and touchpads).
public Vector2 Wheel { get; init; }Property Value
Methods
Deconstruct(out bool, out Vector2, out bool, out bool, out bool)
public void Deconstruct(out bool Present, out Vector2 Position, out bool Primary, out bool Secondary, out bool Middle)Parameters
Present bool
Position Vector2
Primary bool
Secondary bool
Middle bool
Equals(object)
public override bool Equals(object obj)Parameters
obj object
Returns
Equals(PointerState)
public bool Equals(PointerState other)Parameters
other PointerState
Returns
GetHashCode()
public override int GetHashCode()Returns
ToString()
public override string ToString()Returns
Operators
operator ==(PointerState, PointerState)
public static bool operator ==(PointerState left, PointerState right)Parameters
left PointerState
right PointerState
Returns
operator !=(PointerState, PointerState)
public static bool operator !=(PointerState left, PointerState right)Parameters
left PointerState
right PointerState