A MenuItemAtlasFont Helper class that creates a MenuItemLabel class with a LabelAtlas. More...
#include <CCMenuItem.h>
Static Public Member Functions | |
static MenuItemAtlasFont * | create (const std::string &value, const std::string &charMapFile, int itemWidth, int itemHeight, char startCharMap) |
creates a menu item from a string and atlas with a target/selector More... | |
static CC_DEPRECATED_ATTRIBUTE MenuItemAtlasFont * | create (const std::string &value, const std::string &charMapFile, int itemWidth, int itemHeight, char startCharMap, Object *target, SEL_MenuHandler selector) |
creates a menu item from a string and atlas. More... | |
static MenuItemAtlasFont * | create (const std::string &value, const std::string &charMapFile, int itemWidth, int itemHeight, char startCharMap, const ccMenuCallback &callback) |
creates a menu item from a string and atlas. More... | |
Static Public Member Functions inherited from MenuItemLabel | |
static CC_DEPRECATED_ATTRIBUTE MenuItemLabel * | create (Node *label, Object *target, SEL_MenuHandler selector) |
creates a MenuItemLabel with a Label, target and selector More... | |
static MenuItemLabel * | create (Node *label, const ccMenuCallback &callback) |
creates a MenuItemLabel with a Label and a callback More... | |
static MenuItemLabel * | create (Node *label) |
creates a MenuItemLabel with a Label. More... | |
Static Public Member Functions inherited from MenuItem | |
static MenuItem * | create () |
Creates a MenuItem with no target/selector. More... | |
var | create () |
Creates a MenuItem with no target/selector. More... | |
local | create () |
Creates a MenuItem with no target/selector. More... | |
static CC_DEPRECATED_ATTRIBUTE MenuItem * | create (Object *rec, SEL_MenuHandler selector) |
Creates a MenuItem with a target/selector. More... | |
local | create ( local rec, local selector) |
Creates a MenuItem with a target/selector. More... | |
static MenuItem * | create (const ccMenuCallback &callback) |
Creates a MenuItem with a target/selector. More... | |
local | create ( local callback) |
Creates a MenuItem with a target/selector. More... | |
Static Public Member Functions inherited from Node | |
static Node * | create (void) |
Allocates and initializes a node. More... | |
Protected Member Functions | |
MenuItemAtlasFont () | |
virtual | ~MenuItemAtlasFont () |
CC_DEPRECATED_ATTRIBUTE bool | initWithString (const std::string &value, const std::string &charMapFile, int itemWidth, int itemHeight, char startCharMap, Object *target, SEL_MenuHandler selector) |
initializes a menu item from a string and atlas with a target/selector More... | |
bool | initWithString (const std::string &value, const std::string &charMapFile, int itemWidth, int itemHeight, char startCharMap, const ccMenuCallback &callback) |
initializes a menu item from a string and atlas with a target/selector More... | |
Protected Member Functions inherited from MenuItemLabel | |
MenuItemLabel () | |
virtual | ~MenuItemLabel () |
bool | initWithLabel (Node *label, const ccMenuCallback &callback) |
initializes a MenuItemLabel with a Label, target and selector More... | |
CC_DEPRECATED_ATTRIBUTE bool | initWithLabel (Node *label, Object *target, SEL_MenuHandler selector) |
initializes a MenuItemLabel with a Label, target and selector More... | |
Protected Member Functions inherited from MenuItem | |
MenuItem () | |
ctor () | |
MenuItem () | |
virtual | ~MenuItem () |
bool | initWithCallback (const ccMenuCallback &callback) |
Initializes a MenuItem with a target/selector. More... | |
CC_DEPRECATED_ATTRIBUTE bool | initWithTarget (Object *rec, SEL_MenuHandler selector) |
Initializes a MenuItem with a target/selector. More... | |
Protected Member Functions inherited from Node | |
Node () | |
Node () | |
Node () | |
virtual | ~Node () |
local | ~Node () |
virtual bool | init () |
local | init () |
void | childrenAlloc (void) |
lazy allocs More... | |
var | childrenAlloc () |
lazy allocs More... | |
local | childrenAlloc () |
lazy allocs More... | |
void | insertChild (Node *child, int z) |
helper that reorder a child More... | |
var | insertChild ( var child, var z) |
helper that reorder a child More... | |
local | insertChild ( local child, local z) |
helper that reorder a child More... | |
void | detachChild (Node *child, ssize_t index, bool doCleanup) |
Removes a child, call child->onExit(), do cleanup, remove it from children array. More... | |
var | detachChild ( var child, var index, var doCleanup) |
Removes a child, call child->onExit(), do cleanup, remove it from children array. More... | |
local | detachChild ( local child, local index, local doCleanup) |
Removes a child, call child->onExit(), do cleanup, remove it from children array. More... | |
Point | convertToWindowSpace (const Point &nodePoint) const |
Convert cocos2d coordinates to UI windows coordinate. More... | |
var | convertToWindowSpace ( var nodePoint) |
Convert cocos2d coordinates to UI windows coordinate. More... | |
local | convertToWindowSpace ( local nodePoint) |
Convert cocos2d coordinates to UI windows coordinate. More... | |
virtual void | updateCascadeOpacity () |
virtual void | disableCascadeOpacity () |
virtual void | updateCascadeColor () |
virtual void | disableCascadeColor () |
virtual void | updateColor () |
var | updateColor () |
local | updateColor () |
Additional Inherited Members | |
Public Member Functions inherited from MenuItemLabel | |
void | setString (const std::string &label) |
sets a new string to the inner label More... | |
const Color3B & | getDisabledColor () const |
Gets the color that will be used to disable the item. More... | |
void | setDisabledColor (const Color3B &color) |
Sets the color that will be used to disable the item. More... | |
Node * | getLabel () const |
Gets the label that is rendered. More... | |
void | setLabel (Node *node) |
Sets the label that is rendered. More... | |
virtual void | activate () override |
Activate the item. More... | |
virtual void | selected () override |
The item was selected (not activated), similar to "mouse-over". More... | |
virtual void | unselected () override |
The item was unselected. More... | |
virtual void | setEnabled (bool enabled) override |
enables or disables the item More... | |
Public Attributes inherited from Object | |
unsigned int | _ID |
object id, ScriptSupport need public _ID More... | |
int | _luaID |
Lua reference id. More... | |
Static Public Attributes inherited from Node | |
static const int | INVALID_TAG = -1 |
Default tag used for all the nodes. More... | |
var | INVALID_TAG = -1 |
Default tag used for all the nodes. More... | |
local | INVALID_TAG = -1 |
Default tag used for all the nodes. More... | |
Protected Attributes inherited from MenuItemLabel | |
Color3B | _colorBackup |
float | _originalScale |
Color3B | _disabledColor |
the color that will be used to disable the item More... | |
Node * | _label |
Label that is rendered. More... | |
A MenuItemAtlasFont Helper class that creates a MenuItemLabel class with a LabelAtlas.
|
inlineprotected |
|
inlineprotectedvirtual |
|
static |
creates a menu item from a string and atlas with a target/selector
|
static |
creates a menu item from a string and atlas.
Use it with MenuItemToggle
|
static |
creates a menu item from a string and atlas.
Use it with MenuItemToggle
|
protected |
initializes a menu item from a string and atlas with a target/selector
|
protected |
initializes a menu item from a string and atlas with a target/selector