Merge pull request #7426 from Mazyod/cceditbox-mac-fix

CCEditBox SecureInput Mac Fixes
This commit is contained in:
minggo 2014-07-15 14:57:11 +08:00
commit 0dc89db97b
1 changed files with 5 additions and 1 deletions

View File

@ -404,11 +404,15 @@ void EditBoxImplMac::setText(const char* pText)
{
NSString *string = [NSString stringWithUTF8String:pText];
_sysEdit.textField.stringValue = string;
_sysEdit.textField.stringValue = string;
_sysEdit.secureTextField.stringValue = string;
}
const char* EditBoxImplMac::getText(void)
{
if (_sysEdit.secureTextField.superview) {
return [_sysEdit.secureTextField.stringValue UTF8String];
}
return [_sysEdit.textField.stringValue UTF8String];
}