mirror of https://github.com/axmolengine/axmol.git
81 lines
3.0 KiB
Plaintext
81 lines
3.0 KiB
Plaintext
|
|
class CCMenuItem : public CCNode
|
|
{
|
|
CCRect rect();
|
|
void activate();
|
|
void selected();
|
|
void unselected();
|
|
|
|
void registerScriptHandler(const char* pszFunctionName);
|
|
static CCMenuItem * itemWithTarget(SelectorProtocol *rec, SEL_MenuHandler selector);
|
|
};
|
|
|
|
class CCMenuItemLabel : public CCMenuItem
|
|
{
|
|
void setString(const char * label);
|
|
void setIsEnabled(bool enabled);
|
|
|
|
void setOpacity(GLubyte opacity);
|
|
GLubyte getOpacity();
|
|
void setColor(ccColor3B color);
|
|
ccColor3B getColor();
|
|
|
|
static CCMenuItemLabel* itemWithLabel(CCNode* label, SelectorProtocol* target, SEL_MenuHandler selector);
|
|
static CCMenuItemLabel* itemWithLabel(CCNode* label);
|
|
};
|
|
|
|
class CCMenuItemAtlasFont : public CCMenuItemLabel
|
|
{
|
|
static CCMenuItemAtlasFont* itemFromString(const char *value, const char *charMapFile, int itemWidth, int itemHeight, char startCharMap);
|
|
static CCMenuItemAtlasFont* itemFromString(const char *value, const char *charMapFile, int itemWidth, int itemHeight, char startCharMap, SelectorProtocol* target, SEL_MenuHandler selector);
|
|
};
|
|
|
|
class CCMenuItemFont : public CCMenuItemLabel
|
|
{
|
|
static void setFontSize(int s);
|
|
static int fontSize();
|
|
static void setFontName(const char *name);
|
|
static const char *fontName();
|
|
static CCMenuItemFont * itemFromString(const char *value);
|
|
static CCMenuItemFont * itemFromString(const char *value, SelectorProtocol* target, SEL_MenuHandler selector);
|
|
};
|
|
|
|
class CCMenuItemSprite : public CCMenuItem
|
|
{
|
|
void setColor(ccColor3B color);
|
|
ccColor3B getColor();
|
|
void setOpacity(GLubyte opacity);
|
|
GLubyte getOpacity();
|
|
|
|
void selected();
|
|
void unselected();
|
|
void setIsEnabled(bool bEnabled);
|
|
|
|
static CCMenuItemSprite * itemFromNormalSprite(CCNode* normalSprite, CCNode* selectedSprite);
|
|
static CCMenuItemSprite * itemFromNormalSprite(CCNode* normalSprite, CCNode* selectedSprite, SelectorProtocol* target, SEL_MenuHandler selector);
|
|
static CCMenuItemSprite * itemFromNormalSprite(CCNode* normalSprite, CCNode* selectedSprite, CCNode* disabledSprite, SelectorProtocol* target, SEL_MenuHandler selector);
|
|
};
|
|
|
|
class CCMenuItemImage : public CCMenuItemSprite
|
|
{
|
|
void setColor(ccColor3B color);
|
|
ccColor3B getColor();
|
|
void setOpacity(GLubyte opacity);
|
|
GLubyte getOpacity();
|
|
|
|
static CCMenuItemImage* itemFromNormalImage(const char *normalImage, const char *selectedImage);
|
|
static CCMenuItemImage* itemFromNormalImage(const char *normalImage, const char *selectedImage, const char *disabledImage);
|
|
static CCMenuItemImage* itemFromNormalImage(const char *normalImage, const char *selectedImage, SelectorProtocol* target, SEL_MenuHandler selector);
|
|
static CCMenuItemImage* itemFromNormalImage(const char *normalImage, const char *selectedImage, const char *disabledImage, SelectorProtocol* target, SEL_MenuHandler selector);
|
|
};
|
|
|
|
class CCMenuItemToggle : public CCMenuItem
|
|
{
|
|
void addSubItem(CCMenuItem *item);
|
|
|
|
CCMenuItem* selectedItem();
|
|
void setIsEnabled(bool var);
|
|
|
|
static CCMenuItemToggle* itemWithItem(CCMenuItem *item);
|
|
};
|