mirror of https://github.com/axmolengine/axmol.git
fix EditBox lua compile error
This commit is contained in:
parent
28f00df0cf
commit
51e160beff
|
@ -68,12 +68,12 @@ void EditBox::touchDownAction(Ref *sender, TouchEventType controlEvent)
|
|||
}
|
||||
|
||||
EditBox* EditBox::create(const Size& size,
|
||||
const std::string& pNormal9SpriteBg,
|
||||
const std::string& normalSprite,
|
||||
TextureResType texType /*= TextureResType::LOCAL*/)
|
||||
{
|
||||
EditBox* pRet = new EditBox();
|
||||
|
||||
if (pRet != nullptr && pRet->initWithSizeAndBackgroundSprite(size, pNormal9SpriteBg, texType))
|
||||
if (pRet != nullptr && pRet->initWithSizeAndBackgroundSprite(size, normalSprite, texType))
|
||||
{
|
||||
pRet->autorelease();
|
||||
}
|
||||
|
@ -85,11 +85,12 @@ EditBox* EditBox::create(const Size& size,
|
|||
return pRet;
|
||||
}
|
||||
|
||||
EditBox* EditBox::create(const cocos2d::Size &size, cocos2d::ui::Scale9Sprite *pNormal9SpriteBg)
|
||||
|
||||
EditBox* EditBox::create(const cocos2d::Size &size, cocos2d::ui::Scale9Sprite *normalSprite, ui::Scale9Sprite *pressedSprite, Scale9Sprite* disabledSprite)
|
||||
{
|
||||
EditBox* pRet = new (std::nothrow) EditBox();
|
||||
|
||||
if (pRet != nullptr && pRet->initWithSizeAndBackgroundSprite(size, pNormal9SpriteBg))
|
||||
if (pRet != nullptr && pRet->initWithSizeAndBackgroundSprite(size, normalSprite))
|
||||
{
|
||||
pRet->autorelease();
|
||||
}
|
||||
|
|
|
@ -190,7 +190,10 @@ namespace ui {
|
|||
* @return An autorelease pointer of EditBox, you don't need to release it only if you retain it again.
|
||||
*/
|
||||
static EditBox* create(const Size& size,
|
||||
Scale9Sprite* pNormal9SpriteBg);
|
||||
Scale9Sprite* normalSprite,
|
||||
Scale9Sprite* pressedSprite = nullptr,
|
||||
Scale9Sprite* disabledSprite = nullptr);
|
||||
|
||||
|
||||
/**
|
||||
* create a edit box with size.
|
||||
|
|
Loading…
Reference in New Issue