axmol/tools/tolua++/CCMenuItem.pkg

134 lines
3.8 KiB
Plaintext
Raw Normal View History

2011-06-14 14:31:25 +08:00
2012-02-02 14:26:38 +08:00
class CCMenuItem : public CCNode
{
CCRect rect();
void activate();
void selected();
void unselected();
2012-06-15 17:26:11 +08:00
void setEnabled(bool enabled);
bool isEnabled();
bool isSelected();
2012-02-02 14:26:38 +08:00
void registerScriptHandler(LUA_FUNCTION funcID);
2012-02-02 15:58:10 +08:00
void unregisterScriptHandler(void);
2012-02-02 14:26:38 +08:00
};
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);
2012-02-02 14:26:38 +08:00
static CCMenuItemLabel* create(CCNode* label);
2012-02-02 14:26:38 +08:00
};
2012-08-27 11:43:47 +08:00
class CCMenuItemAtlasFont : public CCMenuItemLabel
2012-02-02 14:26:38 +08:00
{
static CCMenuItemAtlasFont* create(const char* value,
2012-02-02 14:26:38 +08:00
const char* charMapFile,
int itemWidth,
int itemHeight,
char startCharMap);
};
2012-08-27 11:43:47 +08:00
class CCMenuItemFont : public CCMenuItemLabel
2012-02-02 14:26:38 +08:00
{
static void setFontSize(int s);
static unsigned int fontSize();
2012-02-02 14:26:38 +08:00
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);
2012-02-02 14:26:38 +08:00
};
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,
2012-02-02 14:26:38 +08:00
CCNode* selectedSprite);
static CCMenuItemSprite * create(CCNode* normalSprite,
2012-02-02 14:26:38 +08:00
CCNode* selectedSprite,
CCNode* disabledSprite);
};
2012-08-27 11:43:47 +08:00
class CCMenuItemImage : public CCMenuItemSprite
2012-02-02 14:26:38 +08:00
{
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,
2012-02-02 14:26:38 +08:00
const char* selectedImage);
static CCMenuItemImage* create(const char* normalImage,
2012-02-02 14:26:38 +08:00
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);
2012-02-02 14:26:38 +08:00
CCMenuItem* selectedItem();
void activate();
void selected();
void unselected();
void setEnabled(bool var);
void setOpacityModifyRGB(bool bValue);
bool isOpacityModifyRGB(void);
static CCMenuItemToggle* create(CCMenuItem *item);
2012-02-02 14:26:38 +08:00
};