tk2dUIManager Class Reference

UI logic. Manages all UI, raycasting, touch/mouse events passing and uiItem event notifications. For any tk2dUIItem to work there needs to be a tk2dUIManager in the scene. More...

List of all members.

Public Attributes

LayerMask raycastLayerMask = -1
 Which layer the raycast will be done using. Will ignore others.
bool areHoverEventsTracked = true
 If hover events are to be tracked. If you don't not need hover events disable for increased performance (less raycasting). Only works when using mouse and multi-touch is disabled (tk2dUIManager.useMultiTouch)

Properties

bool InputEnabled [get, set]
 Used to disable user input.
tk2dUIItem PressedUIItem [get]
 Most recent pressedUIItem (if one is pressed). If multi-touch gets the most recent.
tk2dUIItem[] PressedUIItems [get]
 All currently pressed down UIItems if using multi-touch.

Events

System.Action OnAnyPress
 Only any touch began or mouse click.
System.Action OnInputUpdate
 Fired at the end of every update.
System.Action< float > OnScrollWheelChange
 On mouse scroll wheel change (return direction of mouse scroll wheel change)

Detailed Description

UI logic. Manages all UI, raycasting, touch/mouse events passing and uiItem event notifications. For any tk2dUIItem to work there needs to be a tk2dUIManager in the scene.


Member Data Documentation

If hover events are to be tracked. If you don't not need hover events disable for increased performance (less raycasting). Only works when using mouse and multi-touch is disabled (tk2dUIManager.useMultiTouch)

Which layer the raycast will be done using. Will ignore others.


Property Documentation

bool tk2dUIManager.InputEnabled [get, set]

Used to disable user input.

Most recent pressedUIItem (if one is pressed). If multi-touch gets the most recent.

All currently pressed down UIItems if using multi-touch.


Event Documentation

System.Action tk2dUIManager.OnAnyPress

Only any touch began or mouse click.

Fired at the end of every update.

System.Action<float> tk2dUIManager.OnScrollWheelChange

On mouse scroll wheel change (return direction of mouse scroll wheel change)