Merge pull request #7099 from newnon/v3_edit_box_fixes

EditBox fixes & improvements
This commit is contained in:
minggo 2014-09-04 10:34:44 +08:00
commit 0d777bfa95
2 changed files with 3 additions and 4 deletions

View File

@ -268,7 +268,7 @@ void EditBox::setPlaceholderFontSize(int fontSize)
_placeholderFontSize = fontSize; _placeholderFontSize = fontSize;
if (_editBoxImpl != nullptr && _placeholderFontName.length() > 0) if (_editBoxImpl != nullptr && _placeholderFontName.length() > 0)
{ {
_editBoxImpl->setPlaceholderFont(_placeholderFontName.c_str(), _fontSize); _editBoxImpl->setPlaceholderFont(_placeholderFontName.c_str(), fontSize);
} }
} }

View File

@ -395,8 +395,6 @@ void EditBoxImplIOS::setFont(const char* pFontName, int fontSize)
_label->setSystemFontName(pFontName); _label->setSystemFontName(pFontName);
_label->setSystemFontSize(fontSize); _label->setSystemFontSize(fontSize);
_labelPlaceHolder->setSystemFontName(pFontName);
_labelPlaceHolder->setSystemFontSize(fontSize);
} }
void EditBoxImplIOS::setFontColor(const Color3B& color) void EditBoxImplIOS::setFontColor(const Color3B& color)
@ -407,7 +405,8 @@ void EditBoxImplIOS::setFontColor(const Color3B& color)
void EditBoxImplIOS::setPlaceholderFont(const char* pFontName, int fontSize) void EditBoxImplIOS::setPlaceholderFont(const char* pFontName, int fontSize)
{ {
// TODO: need to be implemented. _labelPlaceHolder->setSystemFontName(pFontName);
_labelPlaceHolder->setSystemFontSize(fontSize);
} }
void EditBoxImplIOS::setPlaceholderFontColor(const Color3B& color) void EditBoxImplIOS::setPlaceholderFontColor(const Color3B& color)