mirror of https://github.com/axmolengine/axmol.git
Merge pull request #7645 from andyque/testPR7549
fix EditBox began/end events not work issue
This commit is contained in:
commit
358d637e75
|
@ -159,7 +159,7 @@
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)textFieldShouldBeginEditing:(NSTextField *)sender // return NO to disallow editing.
|
- (void)controlTextDidBeginEditing:(NSNotification *)notification
|
||||||
{
|
{
|
||||||
editState_ = YES;
|
editState_ = YES;
|
||||||
cocos2d::extension::EditBoxDelegate* pDelegate = getEditBoxImplMac()->getDelegate();
|
cocos2d::extension::EditBoxDelegate* pDelegate = getEditBoxImplMac()->getDelegate();
|
||||||
|
@ -177,10 +177,9 @@
|
||||||
cocos2d::ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event);
|
cocos2d::ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return YES;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)textFieldShouldEndEditing:(NSTextField *)sender
|
- (void)controlTextDidEndEditing:(NSNotification *)notification
|
||||||
{
|
{
|
||||||
editState_ = NO;
|
editState_ = NO;
|
||||||
cocos2d::extension::EditBoxDelegate* pDelegate = getEditBoxImplMac()->getDelegate();
|
cocos2d::extension::EditBoxDelegate* pDelegate = getEditBoxImplMac()->getDelegate();
|
||||||
|
@ -203,7 +202,6 @@
|
||||||
cocos2d::ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event);
|
cocos2d::ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return YES;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue