Cocos2d-x  4.0.0
Static Public Member Functions | Protected Member Functions | List of all members
MenuItemAtlasFont Class Reference

A MenuItemAtlasFont. More...

Inherits MenuItemLabel.

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.
 
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.
 
- Static Public Member Functions inherited from MenuItemLabel
static MenuItemLabelcreate (Node *label, const ccMenuCallback &callback)
 Creates a MenuItemLabel with a Label and a callback.
 
static MenuItemLabelcreate (Node *label)
 Creates a MenuItemLabel with a Label.
 
- Static Public Member Functions inherited from MenuItem
static MenuItemcreate ()
 Creates a MenuItem with no target/selector.
 
static MenuItemcreate (const ccMenuCallback &callback)
 Creates a MenuItem with a target/selector.
 
- Static Public Member Functions inherited from Node
static Nodecreate ()
 Allocates and initializes a node.
 
static int getAttachedNodeCount ()
 Gets count of nodes those are attached to scene graph.
 
template<typename _T >
static void sortNodes (cocos2d::Vector< _T * > &nodes)
 Sorts helper function.
 

Protected Member Functions

 MenuItemAtlasFont ()
 ctor
 
virtual ~MenuItemAtlasFont ()
 NA NA
 
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.
 
- Protected Member Functions inherited from MenuItemLabel
 MenuItemLabel ()
 ctor
 
virtual ~MenuItemLabel ()
 NA NA
 
bool initWithLabel (Node *label, const ccMenuCallback &callback)
 Initializes a MenuItemLabel with a Label, target and selector.
 
- Protected Member Functions inherited from MenuItem
 MenuItem ()
 ctor
 
virtual ~MenuItem ()
 NA NA
 
bool initWithCallback (const ccMenuCallback &callback)
 Initializes a MenuItem with a target/selector.
 

Additional Inherited Members

- Public Member Functions inherited from MenuItemLabel
void setString (const std::string &label)
 Sets a new string to the inner label.
 
std::string getString () const
 Get the inner string of the inner label.
 
const Color3BgetDisabledColor () const
 Gets the color that will be used when the item is disabled.
 
void setDisabledColor (const Color3B &color)
 Sets the color that will be used when the item is disabled.
 
NodegetLabel () const
 Gets the label that is rendered.
 
void setLabel (Node *node)
 Sets the label that is rendered.
 
virtual void activate () override
 Activate the item.
 
virtual void selected () override
 The item was selected (not activated), similar to "mouse-over".
 
virtual void unselected () override
 The item was unselected.
 
virtual void setEnabled (bool enabled) override
 Enables or disables the item.
 
- Public Attributes inherited from Ref
unsigned int _ID
 object id, ScriptSupport need public _ID
 
int _luaID
 Lua reference id.
 
void * _scriptObject
 scriptObject, support for swift
 
bool _rooted
 When true, it means that the object was already rooted.
 
- Static Public Attributes inherited from Node
static const int INVALID_TAG = -1
 Default tag used for all the nodes.
 

Detailed Description

A MenuItemAtlasFont.

Helper class that creates a MenuItemLabel class with a LabelAtlas.

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 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.

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: