mirror of https://github.com/axmolengine/axmol.git
131 lines
3.7 KiB
Plaintext
131 lines
3.7 KiB
Plaintext
|
|
class CCMenuItem : public CCNodeRGBA
|
|
{
|
|
CCRect rect();
|
|
void activate();
|
|
void selected();
|
|
void unselected();
|
|
void setEnabled(bool enabled);
|
|
bool isEnabled() const;
|
|
bool isSelected() const;
|
|
};
|
|
|
|
class CCMenuItemLabel : public CCMenuItem
|
|
{
|
|
void setString(const char* label);
|
|
|
|
void setOpacity(GLubyte opacity);
|
|
GLubyte getOpacity();
|
|
void setColor(Color3B color);
|
|
Color3B getColor();
|
|
void setDisabledColor(const Color3B & color);
|
|
const Color3B & 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 CCMenuItemLabel
|
|
{
|
|
static CCMenuItemAtlasFont* create(const char* value,
|
|
const char* charMapFile,
|
|
int itemWidth,
|
|
int itemHeight,
|
|
char startCharMap);
|
|
};
|
|
|
|
class CCMenuItemFont : public CCMenuItemLabel
|
|
{
|
|
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(Color3B color);
|
|
Color3B 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,
|
|
CCNode* disabledSprite);
|
|
static CCMenuItemSprite * create(CCNode* normalSprite,
|
|
CCNode* selectedSprite);
|
|
};
|
|
|
|
class CCMenuItemImage : public CCMenuItemSprite
|
|
{
|
|
void setColor(Color3B color);
|
|
Color3B getColor();
|
|
void setOpacity(GLubyte opacity);
|
|
GLubyte getOpacity();
|
|
|
|
void setNormalSpriteFrame(CCSpriteFrame* frame);
|
|
void setSelectedSpriteFrame(CCSpriteFrame* frame);
|
|
void setDisabledSpriteFrame(CCSpriteFrame* frame);
|
|
|
|
static CCMenuItemImage* create(const char* normalImage,
|
|
const char* selectedImage,
|
|
const char* disabledImage);
|
|
static CCMenuItemImage* create(const char* normalImage,
|
|
const char* selectedImage);
|
|
static CCMenuItemImage* create();
|
|
};
|
|
|
|
class CCMenuItemToggle : public CCMenuItem
|
|
{
|
|
void setColor(Color3B color);
|
|
Color3B 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);
|
|
};
|