Class PointerInput

Namespace
TDMaker.Unity.View
Assembly
TDMaker.Unity.dll

Mouse and keyboard access that works with both the Input System package and the legacy Input Manager.

public static class PointerInput
Inheritance
PointerInput
Inherited Members

Properties

CancelPressed

Whether Escape was pressed this frame.

public static bool CancelPressed { get; }

Property Value

bool

HasPointer

Whether a mouse is present.

public static bool HasPointer { get; }

Property Value

bool

HeroKeyPressed

Whether the hero selection key (H) was pressed this frame.

public static bool HeroKeyPressed { get; }

Property Value

bool

MiddleHeld

Whether the middle button is held.

public static bool MiddleHeld { get; }

Property Value

bool

Position

Pointer position in screen pixels (origin bottom-left).

public static Vector2 Position { get; }

Property Value

Vector2

PrimaryHeld

Whether the primary (left) button is held.

public static bool PrimaryHeld { get; }

Property Value

bool

PrimaryPressed

Whether the primary (left) button was pressed this frame.

public static bool PrimaryPressed { get; }

Property Value

bool

PrimaryReleased

Whether the primary (left) button was released this frame.

public static bool PrimaryReleased { get; }

Property Value

bool

Scroll

Vertical scroll this frame in notches (positive = away from the user).

public static float Scroll { get; }

Property Value

float

SecondaryPressed

Whether the secondary (right) button was pressed this frame.

public static bool SecondaryPressed { get; }

Property Value

bool

Methods

DigitPressed(int)

Whether the number key digit (1-9, top row or keypad) was pressed this frame.

public static bool DigitPressed(int digit)

Parameters

digit int

Returns

bool

KeyHeld(TDKey)

Whether key is held.

public static bool KeyHeld(TDKey key)

Parameters

key TDKey

Returns

bool

KeyPressed(TDKey)

Whether key went down this frame.

public static bool KeyPressed(TDKey key)

Parameters

key TDKey

Returns

bool