2011-09-19 00:56:23 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
class CCLayer : public CCNode
|
|
|
|
{
|
2012-06-15 17:26:11 +08:00
|
|
|
void setTouchEnabled(bool bValue);
|
|
|
|
bool isTouchEnabled();
|
2012-02-02 14:26:38 +08:00
|
|
|
|
2012-06-15 17:26:11 +08:00
|
|
|
void setAccelerometerEnabled(bool bValue);
|
|
|
|
bool isAccelerometerEnabled();
|
2012-02-02 14:26:38 +08:00
|
|
|
|
2012-06-15 17:26:11 +08:00
|
|
|
void setKeypadEnabled(bool bValue);
|
|
|
|
bool isKeypadEnabled();
|
2012-02-02 14:26:38 +08:00
|
|
|
|
2012-12-02 15:48:15 +08:00
|
|
|
void registerScriptTouchHandler(LUA_FUNCTION nHandler,
|
2012-02-07 11:43:29 +08:00
|
|
|
bool bIsMultiTouches = false,
|
2012-02-02 14:26:38 +08:00
|
|
|
int nPriority = 0,
|
|
|
|
bool bSwallowsTouches = false);
|
|
|
|
void unregisterScriptTouchHandler();
|
|
|
|
|
2012-12-02 15:48:15 +08:00
|
|
|
void registerScriptKeypadHandler(LUA_FUNCTION nHandler);
|
|
|
|
void unregisterScriptKeypadHandler(void);
|
|
|
|
|
|
|
|
void registerScriptAccelerateHandler(LUA_FUNCTION nHandler);
|
|
|
|
void unregisterScriptAccelerateHandler(void);
|
|
|
|
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCLayer *create(void);
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class CCLayerColor : public CCLayer
|
|
|
|
{
|
|
|
|
void changeWidth(GLfloat w);
|
|
|
|
void changeHeight(GLfloat h);
|
|
|
|
void changeWidthAndHeight(GLfloat w ,GLfloat h);
|
|
|
|
|
2012-08-10 18:14:04 +08:00
|
|
|
void setContentSize(const CCSize & var);
|
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
void setOpacity(GLubyte var);
|
|
|
|
GLubyte getOpacity(void);
|
|
|
|
void setColor(ccColor3B Value);
|
|
|
|
ccColor3B getColor(void);
|
|
|
|
void setBlendFunc(ccBlendFunc Value);
|
|
|
|
ccBlendFunc getBlendFunc(void);
|
|
|
|
|
2012-08-10 18:14:04 +08:00
|
|
|
void setOpacityModifyRGB(bool bValue);
|
|
|
|
bool isOpacityModifyRGB(void);
|
|
|
|
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCLayerColor * create(ccColor4B color, GLfloat width, GLfloat height);
|
|
|
|
static CCLayerColor * create(ccColor4B color);
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class CCLayerGradient : public CCLayerColor
|
|
|
|
{
|
|
|
|
void setStartColor(ccColor3B colors);
|
|
|
|
ccColor3B getStartColor();
|
|
|
|
void setEndColor(ccColor3B Value);
|
|
|
|
ccColor3B getEndColor(void);
|
|
|
|
void setStartOpacity(GLubyte Value);
|
|
|
|
GLubyte getStartOpacity(void);
|
|
|
|
void setEndOpacity(GLubyte Value);
|
|
|
|
GLubyte getEndOpacity(void);
|
|
|
|
void setVector(CCPoint Value);
|
|
|
|
CCPoint getVector(void);
|
|
|
|
|
2012-06-15 17:26:11 +08:00
|
|
|
void setCompressedInterpolation(bool Value);
|
|
|
|
bool isCompressedInterpolation(void);
|
2012-02-02 14:26:38 +08:00
|
|
|
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCLayerGradient* create(ccColor4B start, ccColor4B end, CCPoint v);
|
2012-09-17 14:40:42 +08:00
|
|
|
static CCLayerGradient* create(ccColor4B start, ccColor4B end);
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class CCLayerMultiplex : public CCLayer
|
|
|
|
{
|
|
|
|
void addLayer(CCLayer* layer);
|
|
|
|
void switchTo(unsigned int n);
|
|
|
|
void switchToAndReleaseMe(unsigned int n);
|
|
|
|
|
2012-08-10 18:14:04 +08:00
|
|
|
static CCLayerMultiplex * create(CCLayer* layer);
|
2012-06-27 14:21:29 +08:00
|
|
|
static CCLayerMultiplex * createWithLayer(CCLayer* layer);
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|