CCFocusManager
CCFocusManager
Cocos2DInheritance: System.Object
Fields
MenuScrollDelay(System.Single)
Scrolling focus delay used to slow down automatic focus changes when the dpad is held.
Properties
Enabled(System.Boolean)
When false, the focus will not traverse on the keyboard or dpad events.
Instance(Cocos2D.CCFocusManager)
ItemWithFocus(Cocos2D.ICCFocusable)
Returns the item with the current focus. This test will create a copy of the master item list.
Methods
Add(ICCFocusable)
Add(ICCFocusable)(Cocos2D.ICCFocusable f)
Adds the given node to the list of focus nodes. If the node has the focus, then it is given the current focused item status. If there is already a focused item and the given node has focus, the focus is disabled.
Parameters:
f
(Cocos2D.ICCFocusable)Example
FocusNextItem()
FocusNextItem()()
Scroll to the next item in the focus list.
Example
FocusPreviousItem()
FocusPreviousItem()()
Scroll to the previous item in the focus list.
Example
Remove(ICCFocusable)
Remove(ICCFocusable)(Cocos2D.ICCFocusable f)
Removes the given focusable node
Parameters:
f
(Cocos2D.ICCFocusable)Example
Events
OnFocusChanged(Event)