mirror of https://github.com/axmolengine/axmol.git
fixed #1543: The CCLayerGradient background of CocosBuilderTest can't be shown.
This commit is contained in:
parent
711de87808
commit
e8bf21e6a6
|
@ -667,6 +667,11 @@ CCLayerGradient* CCLayerGradient::create(const ccColor4B& start, const ccColor4B
|
|||
return NULL;
|
||||
}
|
||||
|
||||
bool CCLayerGradient::init()
|
||||
{
|
||||
return initWithColor(ccc4(0, 0, 0, 255), ccc4(0, 0, 0, 255));
|
||||
}
|
||||
|
||||
bool CCLayerGradient::initWithColor(const ccColor4B& start, const ccColor4B& end)
|
||||
{
|
||||
return initWithColor(start, end, ccp(0, -1));
|
||||
|
|
|
@ -262,6 +262,7 @@ public:
|
|||
/** Creates a full-screen CCLayer with a gradient between start and end in the direction of v. */
|
||||
static CCLayerGradient* create(const ccColor4B& start, const ccColor4B& end, const CCPoint& v);
|
||||
|
||||
virtual bool init();
|
||||
/** Initializes the CCLayer with a gradient between start and end. */
|
||||
virtual bool initWithColor(const ccColor4B& start, const ccColor4B& end);
|
||||
|
||||
|
|
Loading…
Reference in New Issue