mirror of https://github.com/axmolengine/axmol.git
fix cc
This commit is contained in:
parent
20cb7a6cbc
commit
5213aa7bc9
|
@ -96,7 +96,7 @@ ControlSlider* ControlSlider::create(Sprite * backgroundSprite, Sprite* pogressS
|
||||||
}
|
}
|
||||||
|
|
||||||
ControlSlider* ControlSlider::create(Sprite * backgroundSprite, Sprite* pogressSprite, Sprite* thumbSprite,
|
ControlSlider* ControlSlider::create(Sprite * backgroundSprite, Sprite* pogressSprite, Sprite* thumbSprite,
|
||||||
Sprite* selectedThumbSprite)
|
Sprite* selectedThumbSprite)
|
||||||
{
|
{
|
||||||
ControlSlider *pRet = new ControlSlider();
|
ControlSlider *pRet = new ControlSlider();
|
||||||
pRet->initWithSprites(backgroundSprite, pogressSprite, thumbSprite, selectedThumbSprite);
|
pRet->initWithSprites(backgroundSprite, pogressSprite, thumbSprite, selectedThumbSprite);
|
||||||
|
@ -106,14 +106,14 @@ ControlSlider* ControlSlider::create(Sprite * backgroundSprite, Sprite* pogressS
|
||||||
|
|
||||||
bool ControlSlider::initWithSprites(Sprite * backgroundSprite, Sprite* progressSprite, Sprite* thumbSprite)
|
bool ControlSlider::initWithSprites(Sprite * backgroundSprite, Sprite* progressSprite, Sprite* thumbSprite)
|
||||||
{
|
{
|
||||||
Sprite* selectedThumbSprite = Sprite::createWithTexture(thumbSprite->getTexture(),
|
Sprite* selectedThumbSprite = Sprite::createWithTexture(thumbSprite->getTexture(),
|
||||||
thumbSprite->getTextureRect());
|
thumbSprite->getTextureRect());
|
||||||
selectedThumbSprite->setColor(Color3B::GRAY);
|
selectedThumbSprite->setColor(Color3B::GRAY);
|
||||||
this->initWithSprites(backgroundSprite, progressSprite, thumbSprite, selectedThumbSprite);
|
this->initWithSprites(backgroundSprite, progressSprite, thumbSprite, selectedThumbSprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ControlSlider::initWithSprites(Sprite * backgroundSprite, Sprite* progressSprite, Sprite* thumbSprite,
|
bool ControlSlider::initWithSprites(Sprite * backgroundSprite, Sprite* progressSprite, Sprite* thumbSprite,
|
||||||
Sprite* selectedThumbSprite)
|
Sprite* selectedThumbSprite)
|
||||||
{
|
{
|
||||||
if (Control::init())
|
if (Control::init())
|
||||||
{
|
{
|
||||||
|
|
|
@ -64,7 +64,7 @@ public:
|
||||||
* and a selected thumb image filename.
|
* and a selected thumb image filename.
|
||||||
*/
|
*/
|
||||||
static ControlSlider* create(const char* bgFile, const char* progressFile, const char* thumbFile,
|
static ControlSlider* create(const char* bgFile, const char* progressFile, const char* thumbFile,
|
||||||
const char* selectedThumbSpriteFile);
|
const char* selectedThumbSpriteFile);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a slider with a given background sprite and a progress bar, a thumb
|
* Creates a slider with a given background sprite and a progress bar, a thumb
|
||||||
|
@ -73,7 +73,7 @@ public:
|
||||||
* @see initWithSprites
|
* @see initWithSprites
|
||||||
*/
|
*/
|
||||||
static ControlSlider* create(Sprite * backgroundSprite, Sprite* pogressSprite, Sprite* thumbSprite,
|
static ControlSlider* create(Sprite * backgroundSprite, Sprite* pogressSprite, Sprite* thumbSprite,
|
||||||
Sprite* selectedThumbSprite);
|
Sprite* selectedThumbSprite);
|
||||||
/**
|
/**
|
||||||
* @js ctor
|
* @js ctor
|
||||||
*/
|
*/
|
||||||
|
@ -104,7 +104,7 @@ public:
|
||||||
* @param selectedThumbSprite Sprite, that is used as a selected thumb.
|
* @param selectedThumbSprite Sprite, that is used as a selected thumb.
|
||||||
*/
|
*/
|
||||||
virtual bool initWithSprites(Sprite * backgroundSprite, Sprite* progressSprite, Sprite* thumbSprite,
|
virtual bool initWithSprites(Sprite * backgroundSprite, Sprite* progressSprite, Sprite* thumbSprite,
|
||||||
Sprite* selectedThumbSprite);
|
Sprite* selectedThumbSprite);
|
||||||
|
|
||||||
virtual void needsLayout();
|
virtual void needsLayout();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue