mirror of https://github.com/axmolengine/axmol.git
134 lines
3.8 KiB
Plaintext
134 lines
3.8 KiB
Plaintext
|
|
class CCMenuItem : public CCNode
|
|
{
|
|
CCRect rect();
|
|
void activate();
|
|
void selected();
|
|
void unselected();
|
|
void setEnabled(bool enabled);
|
|
bool isEnabled();
|
|
bool isSelected();
|
|
|
|
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();
|
|
void setDisabledColor(const ccColor3B & color);
|
|
const ccColor3B & getDisabledColor();
|
|
void setLabel(CCNode* pLabel);
|
|
CCNode* getLabel();
|
|
|
|
void activate();
|
|
void selected();
|
|
void unselected();
|
|
void setEnabled(bool enabled);
|
|
|
|
void setOpacityModifyRGB(bool bValue);
|
|
bool isOpacityModifyRGB(void);
|
|
|
|
static CCMenuItemLabel* create(CCNode* label);
|
|
};
|
|
|
|
class CCMenuItemAtlasFont : public CCMenuItem
|
|
{
|
|
static CCMenuItemAtlasFont* create(const char* value,
|
|
const char* charMapFile,
|
|
int itemWidth,
|
|
int itemHeight,
|
|
char startCharMap);
|
|
};
|
|
|
|
class CCMenuItemFont : public CCMenuItem
|
|
{
|
|
static void setFontSize(int s);
|
|
static unsigned int fontSize();
|
|
static void setFontName(const char* name);
|
|
static const char* fontName();
|
|
void setFontSizeObj(unsigned int s);
|
|
unsigned int fontSizeObj();
|
|
void setFontNameObj(const char* name);
|
|
const char* fontNameObj();
|
|
|
|
static CCMenuItemFont * create(const char* value);
|
|
};
|
|
|
|
class CCMenuItemSprite : public CCMenuItem
|
|
{
|
|
void setColor(ccColor3B color);
|
|
ccColor3B getColor();
|
|
void setOpacity(GLubyte opacity);
|
|
GLubyte getOpacity();
|
|
|
|
void setNormalImage(CCNode* pImage);
|
|
CCNode* getNormalImage();
|
|
void setSelectedImage(CCNode* pImage);
|
|
CCNode* getSelectedImage();
|
|
void setDisabledImage(CCNode* pImage);
|
|
CCNode* getDisabledImage();
|
|
|
|
void selected();
|
|
void unselected();
|
|
void setEnabled(bool bEnabled);
|
|
|
|
void setOpacityModifyRGB(bool bValue);
|
|
bool isOpacityModifyRGB(void);
|
|
|
|
static CCMenuItemSprite * create(CCNode* normalSprite,
|
|
CCNode* selectedSprite);
|
|
static CCMenuItemSprite * create(CCNode* normalSprite,
|
|
CCNode* selectedSprite,
|
|
CCNode* disabledSprite);
|
|
};
|
|
|
|
class CCMenuItemImage : public CCMenuItem
|
|
{
|
|
void setColor(ccColor3B color);
|
|
ccColor3B getColor();
|
|
void setOpacity(GLubyte opacity);
|
|
GLubyte getOpacity();
|
|
|
|
void setNormalSpriteFrame(CCSpriteFrame* frame);
|
|
void setSelectedSpriteFrame(CCSpriteFrame* frame);
|
|
void setDisabledSpriteFrame(CCSpriteFrame* frame);
|
|
|
|
static CCMenuItemImage* create();
|
|
static CCMenuItemImage* create(const char* normalImage,
|
|
const char* selectedImage);
|
|
static CCMenuItemImage* create(const char* normalImage,
|
|
const char* selectedImage,
|
|
const char* disabledImage);
|
|
};
|
|
|
|
class CCMenuItemToggle : public CCMenuItem
|
|
{
|
|
void setColor(ccColor3B color);
|
|
ccColor3B getColor();
|
|
void setOpacity(GLubyte opacity);
|
|
GLubyte getOpacity();
|
|
void setSelectedIndex(unsigned int index);
|
|
unsigned int getSelectedIndex();
|
|
void setSubItems(CCArray* pArrayOfItems);
|
|
CCArray* getSubItems();
|
|
|
|
void addSubItem(CCMenuItem *item);
|
|
CCMenuItem* selectedItem();
|
|
|
|
void activate();
|
|
void selected();
|
|
void unselected();
|
|
void setEnabled(bool var);
|
|
|
|
void setOpacityModifyRGB(bool bValue);
|
|
bool isOpacityModifyRGB(void);
|
|
|
|
static CCMenuItemToggle* create(CCMenuItem *item);
|
|
};
|