mirror of https://github.com/axmolengine/axmol.git
83 lines
2.5 KiB
Plaintext
83 lines
2.5 KiB
Plaintext
|
|
class CCMenuItem : public CCNode
|
|
{
|
|
CCRect rect();
|
|
void activate();
|
|
void selected();
|
|
void unselected();
|
|
void setIsEnabled(bool enabled);
|
|
bool getIsEnabled();
|
|
bool getIsSelected();
|
|
|
|
tolua_property__CCIsEnabled bool isEnabled;
|
|
|
|
void registerScriptHandler(LUA_FUNCTION funcID);
|
|
void unregisterScriptHandler(void);
|
|
};
|
|
|
|
class CCMenuItemLabel : public CCMenuItem
|
|
{
|
|
void setString(const char* label);
|
|
|
|
void setOpacity(GLubyte opacity);
|
|
GLubyte getOpacity();
|
|
void setColor(ccColor3B color);
|
|
ccColor3B getColor();
|
|
|
|
static CCMenuItemLabel* itemWithLabel(CCNode* label);
|
|
};
|
|
|
|
class CCMenuItemAtlasFont : public CCMenuItem
|
|
{
|
|
static CCMenuItemAtlasFont* itemFromString(const char* value,
|
|
const char* charMapFile,
|
|
int itemWidth,
|
|
int itemHeight,
|
|
char startCharMap);
|
|
};
|
|
|
|
class CCMenuItemFont : public CCMenuItem
|
|
{
|
|
static void setFontSize(int s);
|
|
static int fontSize();
|
|
static void setFontName(const char* name);
|
|
static const char* fontName();
|
|
static CCMenuItemFont * itemFromString(const char* value);
|
|
};
|
|
|
|
class CCMenuItemSprite : public CCMenuItem
|
|
{
|
|
void setColor(ccColor3B color);
|
|
ccColor3B getColor();
|
|
void setOpacity(GLubyte opacity);
|
|
GLubyte getOpacity();
|
|
|
|
static CCMenuItemSprite * itemFromNormalSprite(CCNode* normalSprite,
|
|
CCNode* selectedSprite);
|
|
static CCMenuItemSprite * itemFromNormalSprite(CCNode* normalSprite,
|
|
CCNode* selectedSprite,
|
|
CCNode* disabledSprite);
|
|
};
|
|
|
|
class CCMenuItemImage : public CCMenuItem
|
|
{
|
|
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);
|
|
};
|
|
|
|
class CCMenuItemToggle : public CCMenuItem
|
|
{
|
|
void addSubItem(CCMenuItem *item);
|
|
CCMenuItem* selectedItem();
|
|
|
|
static CCMenuItemToggle* itemWithItem(CCMenuItem *item);
|
|
};
|