Skip to content

InputAPI reference

Struct PointerState

Namespace: MicroEngine.Input
Assembly: MicroEngine.Input.dll
Guide: Input

The mouse (or another pointer) over the game’s virtual canvas.

C#
public readonly struct PointerState : IEquatable<PointerState>

Implements

IEquatable<PointerState>

Constructors

PointerState(bool, Vector2, bool, bool, bool)

The mouse (or another pointer) over the game’s virtual canvas.

C#
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

C#
public bool Middle { get; init; }

Property Value

bool

Position

Position in virtual canvas pixels (may lie outside the canvas, in the letterbox).

C#
public Vector2 Position { get; init; }

Property Value

Vector2

Present

Whether the pointer is over the window at all.

C#
public bool Present { get; init; }

Property Value

bool

Primary

C#
public bool Primary { get; init; }

Property Value

bool

Secondary

C#
public bool Secondary { get; init; }

Property Value

bool

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).

C#
public Vector2 Wheel { get; init; }

Property Value

Vector2

Methods

Deconstruct(out bool, out Vector2, out bool, out bool, out bool)

C#
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)

C#
public override bool Equals(object obj)

Parameters

obj object

Returns

bool

Equals(PointerState)

C#
public bool Equals(PointerState other)

Parameters

other PointerState

Returns

bool

GetHashCode()

C#
public override int GetHashCode()

Returns

int

ToString()

C#
public override string ToString()

Returns

string

Operators

operator ==(PointerState, PointerState)

C#
public static bool operator ==(PointerState left, PointerState right)

Parameters

left PointerState

right PointerState

Returns

bool

operator !=(PointerState, PointerState)

C#
public static bool operator !=(PointerState left, PointerState right)

Parameters

left PointerState

right PointerState

Returns

bool