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...
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) |
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.
bool tk2dUIManager.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)
LayerMask tk2dUIManager.raycastLayerMask = -1 |
Which layer the raycast will be done using. Will ignore others.
bool tk2dUIManager.InputEnabled [get, set] |
Used to disable user input.
Most recent pressedUIItem (if one is pressed). If multi-touch gets the most recent.
tk2dUIItem [] tk2dUIManager.PressedUIItems [get] |
All currently pressed down UIItems if using multi-touch.
System.Action tk2dUIManager.OnAnyPress |
Only any touch began or mouse click.
System.Action tk2dUIManager.OnInputUpdate |
Fired at the end of every update.
System.Action<float> tk2dUIManager.OnScrollWheelChange |
On mouse scroll wheel change (return direction of mouse scroll wheel change)