cocos2d-x  3.0rc1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
MenuItemAtlasFont Class Reference

A MenuItemAtlasFont Helper class that creates a MenuItemLabel class with a LabelAtlas. More...

#include <CCMenuItem.h>

Inheritance diagram for MenuItemAtlasFont:
MenuItemLabel MenuItem Node Ref

Static Public Member Functions

static MenuItemAtlasFontcreate (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, Ref *target, SEL_MenuHandler selector)
 creates a menu item from a string and atlas. More...
 
static MenuItemAtlasFontcreate (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, Ref *target, SEL_MenuHandler selector)
 creates a MenuItemLabel with a Label, target and selector More...
 
static MenuItemLabelcreate (Node *label, const ccMenuCallback &callback)
 creates a MenuItemLabel with a Label and a callback More...
 
static MenuItemLabelcreate (Node *label)
 creates a MenuItemLabel with a Label. More...
 
- Static Public Member Functions inherited from MenuItem
static MenuItemcreate ()
 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 (Ref *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 MenuItemcreate (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 Nodecreate (void)
 Allocates and initializes a node. More...
 
var create ()
 Allocates and initializes a node. More...
 
local create ()
 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, Ref *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, Ref *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 (Ref *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...
 
kmMat4 transform (const kmMat4 &parentTransform)
virtual void updateCascadeOpacity ()
var updateCascadeOpacity ()
local updateCascadeOpacity ()
virtual void disableCascadeOpacity ()
var disableCascadeOpacity ()
local disableCascadeOpacity ()
virtual void updateCascadeColor ()
var updateCascadeColor ()
local updateCascadeColor ()
virtual void disableCascadeColor ()
virtual void updateColor ()
var updateColor ()
local updateColor ()
- Protected Member Functions inherited from Ref
 Ref ()
 Constructor. More...
 
 Ref ()
 Constructor. More...
 

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 Color3BgetDisabledColor () 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...
 
NodegetLabel () 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...
 
- 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...
 
- Static Protected Attributes inherited from Node
static int s_globalOrderOfArrival
var s_globalOrderOfArrival
local s_globalOrderOfArrival

Detailed Description

A MenuItemAtlasFont Helper class that creates a MenuItemLabel class with a LabelAtlas.

Constructor & Destructor Documentation

MenuItemAtlasFont ( )
inlineprotected
virtual ~MenuItemAtlasFont ( )
inlineprotectedvirtual

Member Function Documentation

static MenuItemAtlasFont* create ( const std::string &  value,
const std::string &  charMapFile,
int  itemWidth,
int  itemHeight,
char  startCharMap 
)
static

creates a menu item from a string and atlas with a target/selector

static CC_DEPRECATED_ATTRIBUTE
MenuItemAtlasFont* create
( const std::string &  value,
const std::string &  charMapFile,
int  itemWidth,
int  itemHeight,
char  startCharMap,
Ref target,
SEL_MenuHandler  selector 
)
static

creates a menu item from a string and atlas.

Use it with MenuItemToggle

static MenuItemAtlasFont* create ( const std::string &  value,
const std::string &  charMapFile,
int  itemWidth,
int  itemHeight,
char  startCharMap,
const ccMenuCallback callback 
)
static

creates a menu item from a string and atlas.

Use it with MenuItemToggle

CC_DEPRECATED_ATTRIBUTE bool
initWithString
( const std::string &  value,
const std::string &  charMapFile,
int  itemWidth,
int  itemHeight,
char  startCharMap,
Ref target,
SEL_MenuHandler  selector 
)
protected

initializes a menu item from a string and atlas with a target/selector

bool initWithString ( const std::string &  value,
const std::string &  charMapFile,
int  itemWidth,
int  itemHeight,
char  startCharMap,
const ccMenuCallback callback 
)
protected

initializes a menu item from a string and atlas with a target/selector


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