Skip to content
SiteEmail

cohtml.InputSystem.PointerEvent

Base class for any event based on a pointing device and can be sent to a CohtmlView component.

Inherits from cohtml.InputSystem.InputEvent, cohtml.InputSystem.IViewSendable

Inherited by cohtml.InputSystem.GestureEvent, cohtml.InputSystem.MouseEvent, cohtml.InputSystem.TouchEvent

Name
enum classEventType { Up, Down, Move}
The type of the pointer event.
Name
voidAddView(CohtmlView view, Vector2Int position)
Temporarily stores the CohtmlView component and the position where the event happened.
Vector2IntGetViewPosition(CohtmlView view)
Returns the position of the event that hit a CohtmlView.
voidRemoveView(CohtmlView view)
Removes the CohtmlView from the temporary collection of events that happened.
voidClearViews()
Clears the collection of CohtmlView components hit by this event.
Name
Vector2IntPosition
The position of the pointer event.
intX
The X coordinate of the events position.
intY
The Y coordinate of the events position.
abstract EventTypePointerEventType
Returns the type of the pointer event.

Public Functions inherited from cohtml.InputSystem.InputEvent

Name
virtual voidSend(CohtmlView view)
Sends the input event to a CohtmlView component.
voidDispose()

Public Functions inherited from cohtml.InputSystem.IViewSendable

Name
voidSend(CohtmlView view)
EnumeratorValueDescription
Up
Down
Move

The type of the pointer event.

void AddView(
CohtmlView view,
Vector2Int position
)

Temporarily stores the CohtmlView component and the position where the event happened.

Parameters:

  • view The CohtmlView component hit by the event.
  • position The position where the event happened.
Vector2Int GetViewPosition(
CohtmlView view
)

Returns the position of the event that hit a CohtmlView.

Parameters:

void RemoveView(
CohtmlView view
)

Removes the CohtmlView from the temporary collection of events that happened.

Parameters:

void ClearViews()

Clears the collection of CohtmlView components hit by this event.

Vector2Int Position;

The position of the pointer event.

int X;

The X coordinate of the events position.

int Y;

The Y coordinate of the events position.

abstract EventType PointerEventType;

Returns the type of the pointer event.