NGUI: Next-Gen UI kit  3.7.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros
UIKeyNavigation Class Reference

Attaching this script to a widget makes it react to key events such as tab, up, down, etc. More...

Inheritance diagram for UIKeyNavigation:
UIButtonKeys

Public Types

enum  Constraint { Constraint.None, Constraint.Vertical, Constraint.Horizontal, Constraint.Explicit }
 

Public Attributes

Constraint constraint = Constraint.None
 If a selection target is not set, the target can be determined automatically, restricted by this constraint. 'None' means free movement on both horizontal and vertical axis. 'Explicit' means the automatic logic will not execute, and only the explicitly set values will be used. More...
 
GameObject onUp
 Which object will be selected when the Up button is pressed. More...
 
GameObject onDown
 Which object will be selected when the Down button is pressed. More...
 
GameObject onLeft
 Which object will be selected when the Left button is pressed. More...
 
GameObject onRight
 Which object will be selected when the Right button is pressed. More...
 
GameObject onClick
 Which object will get selected on click. More...
 
bool startsSelected = false
 Whether the object this script is attached to will get selected as soon as this script is enabled. More...
 

Static Public Attributes

static BetterList
< UIKeyNavigation
list = new BetterList<UIKeyNavigation>()
 List of all the active UINavigation components. More...
 

Protected Member Functions

virtual void OnEnable ()
 
virtual void OnDisable ()
 
GameObject GetLeft ()
 
GameObject GetUp ()
 
GameObject GetDown ()
 
GameObject Get (Vector3 myDir, bool horizontal)
 
virtual void OnKey (KeyCode key)
 
virtual void OnClick ()
 

Static Protected Member Functions

static Vector3 GetCenter (GameObject go)
 

Detailed Description

Attaching this script to a widget makes it react to key events such as tab, up, down, etc.

Member Enumeration Documentation

Enumerator
None 
Vertical 
Horizontal 
Explicit 

Member Function Documentation

GameObject UIKeyNavigation.Get ( Vector3  myDir,
bool  horizontal 
)
protected
static Vector3 UIKeyNavigation.GetCenter ( GameObject  go)
staticprotected
GameObject UIKeyNavigation.GetDown ( )
protected
GameObject UIKeyNavigation.GetLeft ( )
protected
GameObject UIKeyNavigation.GetUp ( )
protected
virtual void UIKeyNavigation.OnClick ( )
protectedvirtual
virtual void UIKeyNavigation.OnDisable ( )
protectedvirtual
virtual void UIKeyNavigation.OnEnable ( )
protectedvirtual

Reimplemented in UIButtonKeys.

virtual void UIKeyNavigation.OnKey ( KeyCode  key)
protectedvirtual

Member Data Documentation

Constraint UIKeyNavigation.constraint = Constraint.None

If a selection target is not set, the target can be determined automatically, restricted by this constraint. 'None' means free movement on both horizontal and vertical axis. 'Explicit' means the automatic logic will not execute, and only the explicitly set values will be used.

BetterList<UIKeyNavigation> UIKeyNavigation.list = new BetterList<UIKeyNavigation>()
static

List of all the active UINavigation components.

GameObject UIKeyNavigation.onClick

Which object will get selected on click.

GameObject UIKeyNavigation.onDown

Which object will be selected when the Down button is pressed.

GameObject UIKeyNavigation.onLeft

Which object will be selected when the Left button is pressed.

GameObject UIKeyNavigation.onRight

Which object will be selected when the Right button is pressed.

GameObject UIKeyNavigation.onUp

Which object will be selected when the Up button is pressed.

bool UIKeyNavigation.startsSelected = false

Whether the object this script is attached to will get selected as soon as this script is enabled.


The documentation for this class was generated from the following file: