mirror of https://github.com/axmolengine/axmol.git
fix compiling error caused by disable CC_ENABLE_SCRIPT_BINDING
This commit is contained in:
parent
3bd466ce49
commit
ac0fb68989
|
@ -690,14 +690,16 @@ void EditBoxImplWin::openKeyboard()
|
||||||
{
|
{
|
||||||
_delegate->editBoxEditingDidBegin(_editBox);
|
_delegate->editBoxEditingDidBegin(_editBox);
|
||||||
}
|
}
|
||||||
|
|
||||||
EditBox* pEditBox = this->getEditBox();
|
#if CC_ENABLE_SCRIPT_BINDING
|
||||||
if (nullptr != pEditBox && 0 != pEditBox->getScriptEditBoxHandler())
|
auto editBox = this->getEditBox();
|
||||||
|
if (editBox && editBox->getScriptEditBoxHandler())
|
||||||
{
|
{
|
||||||
CommonScriptData data(pEditBox->getScriptEditBoxHandler(), "began",pEditBox);
|
CommonScriptData data(editBox->getScriptEditBoxHandler(), "began",editBox);
|
||||||
ScriptEvent event(kCommonEvent,(void*)&data);
|
ScriptEvent event(kCommonEvent,(void*)&data);
|
||||||
ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event);
|
ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
std::string placeHolder = _labelPlaceHolder->getString();
|
std::string placeHolder = _labelPlaceHolder->getString();
|
||||||
if (placeHolder.length() == 0)
|
if (placeHolder.length() == 0)
|
||||||
|
|
|
@ -330,7 +330,7 @@ void UIEditBoxImplWinrt::openKeyboard()
|
||||||
{
|
{
|
||||||
_delegate->editBoxEditingDidBegin(_editBox);
|
_delegate->editBoxEditingDidBegin(_editBox);
|
||||||
}
|
}
|
||||||
|
#if CC_ENABLE_SCRIPT_BINDING
|
||||||
EditBox* pEditBox = this->getEditBox();
|
EditBox* pEditBox = this->getEditBox();
|
||||||
if (NULL != pEditBox && 0 != pEditBox->getScriptEditBoxHandler())
|
if (NULL != pEditBox && 0 != pEditBox->getScriptEditBoxHandler())
|
||||||
{
|
{
|
||||||
|
@ -338,7 +338,7 @@ void UIEditBoxImplWinrt::openKeyboard()
|
||||||
ScriptEvent event(kCommonEvent,(void*)&data);
|
ScriptEvent event(kCommonEvent,(void*)&data);
|
||||||
ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event);
|
ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
std::string placeHolder = m_pLabelPlaceHolder->getString();
|
std::string placeHolder = m_pLabelPlaceHolder->getString();
|
||||||
if (placeHolder.length() == 0)
|
if (placeHolder.length() == 0)
|
||||||
placeHolder = "Enter value";
|
placeHolder = "Enter value";
|
||||||
|
|
|
@ -66,7 +66,7 @@ void UIEditBoxImplWp8::openKeyboard()
|
||||||
{
|
{
|
||||||
_delegate->editBoxEditingDidBegin(_editBox);
|
_delegate->editBoxEditingDidBegin(_editBox);
|
||||||
}
|
}
|
||||||
|
#if CC_ENABLE_SCRIPT_BINDING
|
||||||
EditBox* pEditBox = this->getEditBox();
|
EditBox* pEditBox = this->getEditBox();
|
||||||
if (NULL != pEditBox && 0 != pEditBox->getScriptEditBoxHandler())
|
if (NULL != pEditBox && 0 != pEditBox->getScriptEditBoxHandler())
|
||||||
{
|
{
|
||||||
|
@ -74,7 +74,7 @@ void UIEditBoxImplWp8::openKeyboard()
|
||||||
ScriptEvent event(kCommonEvent,(void*)&data);
|
ScriptEvent event(kCommonEvent,(void*)&data);
|
||||||
ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event);
|
ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
std::string placeHolder = m_pLabelPlaceHolder->getString();
|
std::string placeHolder = m_pLabelPlaceHolder->getString();
|
||||||
if (placeHolder.length() == 0)
|
if (placeHolder.length() == 0)
|
||||||
placeHolder = "Enter value";
|
placeHolder = "Enter value";
|
||||||
|
|
Loading…
Reference in New Issue