2013-04-03 16:29:16 +08:00
|
|
|
enum
|
2012-06-15 11:46:51 +08:00
|
|
|
{
|
|
|
|
kCCMenuStateWaiting,
|
|
|
|
kCCMenuStateTrackingTouch
|
2013-04-03 16:29:16 +08:00
|
|
|
};
|
2012-06-15 11:46:51 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
enum {
|
2013-04-03 16:29:16 +08:00
|
|
|
kCCMenuHandlerPriority = -128
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|
2013-04-02 17:52:08 +08:00
|
|
|
|
|
|
|
class CCMenu : public CCLayerRGBA
|
2012-02-02 14:26:38 +08:00
|
|
|
{
|
|
|
|
void alignItemsVertically();
|
|
|
|
void alignItemsVerticallyWithPadding(float padding);
|
|
|
|
void alignItemsHorizontally();
|
|
|
|
void alignItemsHorizontallyWithPadding(float padding);
|
2013-05-23 15:39:41 +08:00
|
|
|
void alignItemsInColumnsWithArray(CCArray* rows);
|
|
|
|
void alignItemsInRowsWithArray(CCArray* columns);
|
2012-02-02 14:26:38 +08:00
|
|
|
|
2013-05-23 15:39:41 +08:00
|
|
|
void setHandlerPriority(int newPriority);
|
2012-08-10 18:14:04 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
void addChild(CCMenuItem* child, int zOrder = 0, int tag = -1);
|
|
|
|
|
|
|
|
void setOpacity(GLubyte opacity);
|
|
|
|
GLubyte getOpacity(void);
|
|
|
|
void setColor(ccColor3B color);
|
|
|
|
ccColor3B getColor(void);
|
|
|
|
|
2013-05-23 15:39:41 +08:00
|
|
|
void setOpacityModifyRGB(bool bValue);
|
2012-08-10 18:14:04 +08:00
|
|
|
bool isOpacityModifyRGB(void);
|
|
|
|
|
|
|
|
bool isEnabled();
|
|
|
|
void setEnabled(bool value);
|
|
|
|
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCMenu* create();
|
|
|
|
static CCMenu* createWithItem(CCMenuItem* item);
|
2013-05-23 15:39:41 +08:00
|
|
|
static CCMenu* createWithArray(CCArray* pArrayOfItems);
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|