Skip to content
SiteEmail

cohtml.InputSystem.TouchEvent

A class storing touch input event data.

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

Name
TouchEvent(uint id)
Creates a touch event with the given id.
voidUpdateActiveState()
Updates the IsActive state of the event.
TouchEventDataSetNativePosition(Vector2Int position)
Sets the X and Y coordinate of the events position.
Name
uintId
The identification number of the event.
boolIsActive
Returns true if the touch event is active.
override EventTypePointerEventType
Returns the pointer event type.
TouchEventData.EventTypeType
The event type of this mouse event.
EventModifiersStateModifiers
The key modifiers of this touch event.

Public Types inherited from cohtml.InputSystem.PointerEvent

Name
enum classEventType { Up, Down, Move}
The type of the pointer event.

Public Functions inherited from cohtml.InputSystem.PointerEvent

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.

Public Properties inherited from cohtml.InputSystem.PointerEvent

Name
Vector2IntPosition
The position of the pointer event.
intX
The X coordinate of the events position.
intY
The Y coordinate of the events position.

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)
TouchEvent(
uint id
)

Creates a touch event with the given id.

Parameters:

  • id The identification of the event.
void UpdateActiveState()

Updates the IsActive state of the event.

TouchEventData SetNativePosition(
Vector2Int position
)

Sets the X and Y coordinate of the events position.

Parameters:

  • position The event position in screen space coordinates.
uint Id;

The identification number of the event.

bool IsActive;

Returns true if the touch event is active.

override EventType PointerEventType;

Returns the pointer event type.

TouchEventData.EventType Type;

The event type of this mouse event.

EventModifiersState Modifiers;

The key modifiers of this touch event.