Ctrl+K

IPointingDevice

Declaration

public interface Strawberry.Input.IPointingDevice

A pointing device like mouse, touchpad or touchscreen.

Properties

PressedButtons abstract

The buttons that are pressed. A button can only be pressed for 1 FixedUpdate. The pressed button will be available in DownButtons until the button is released;

PointerButtons[] PressedButtons { get }

DownButtons abstract

The buttons that are down.

PointerButtons[] DownButtons { get }

ReleasedButtons abstract

The buttons that are released. A button can only be released for 1 FixedUpdate. The released button will be removed from DownButtons

PointerButtons[] ReleasedButtons { get }

Methods

GetPosition abstract

Gets the position of the pointer.

Vector2 GetPosition(int index)

Parameters:

Name Type Description
index System.Int32 The index of the pointer (used for multi-touch screens)

FirePressed abstract

Changes the state of the button to pressed

void FirePressed(int index, PointerButtons button)

Parameters:

Name Type Description
index System.Int32 Index of the touch/pointer
button Strawberry.Input.PointerButtons The pressed button

FireReleased abstract

Changes the state of the button to released

void FireReleased(int index, PointerButtons button)

Parameters:

Name Type Description
index System.Int32 Index of the touch/pointer
button Strawberry.Input.PointerButtons The released button

IsButtonDown abstract

Checks wheather the specified button is down.

bool IsButtonDown(int index, PointerButtons button)

Parameters:

Name Type Description
index System.Int32
button Strawberry.Input.PointerButtons The button to check

Returns: True if the button is down

IsButtonPressed abstract

Checks wheather the specified button is pressed.

bool IsButtonPressed(int index, PointerButtons button)

Parameters:

Name Type Description
index System.Int32
button Strawberry.Input.PointerButtons The button to check

Returns: True if the button is pressed

IsButtonReleased abstract

Checks wheather the specified button is released.

bool IsButtonReleased(int index, PointerButtons button)

Parameters:

Name Type Description
index System.Int32
button Strawberry.Input.PointerButtons The button to check

Returns: True if the button is released