Class CCMenuItemToggle

#include <Geode/cocos/menu_nodes/CCMenuItem.h>
classCCMenuItemToggle:publiccocos2d::CCMenuItem{ ... }

A CCMenuItemToggle A simple container class that “toggles” it’s inner items The inner items can be any MenuItem

Examples0
Public static methods4
staticcocos2d::CCMenuItemToggle*createWithTarget(,,)

creates a menu item from a CCArray with a target selector

staticcocos2d::CCMenuItemToggle*createWithTarget(,,)

creates a menu item from a list of items with a target/selector

staticcocos2d::CCMenuItemToggle*create()

creates a menu item with no target/selector and no items

staticcocos2d::CCMenuItemToggle*create()

creates a menu item with a item

Public member functions12
virtualuintgetSelectedIndex()

returns the selected item

virtualvoidsetSelectedIndex(
uintvar
)

returns the selected item

virtualcocos2d::CCArray*getSubItems()

Since v0.7.2

CCMutableArray that contains the subitems. You can add/remove items in runtime, and you can replace the array with a new one.

virtualvoidsetSubItems()

Since v0.7.2

CCMutableArray that contains the subitems. You can add/remove items in runtime, and you can replace the array with a new one.

boolinitWithTarget(,,,)

initializes a menu item from a list of items with a target selector

boolinitWithItem()

initializes a menu item with a item

voidaddSubItem()

add more menu item

cocos2d::CCMenuItem*selectedItem()

return the selected item

virtualvoidactivate()
No description provided
virtualvoidselected()
No description provided
virtualvoidunselected()
No description provided
virtualvoidsetEnabled(
boolvar
)
No description provided
Fields0
Protected member functions0
Protected fields2
uintm_uSelectedIndex
;

returns the selected item

;

Since v0.7.2

CCMutableArray that contains the subitems. You can add/remove items in runtime, and you can replace the array with a new one.