From 14853d46f28788e4c37c2be0f7fc653ddc95c5ef Mon Sep 17 00:00:00 2001 From: Sergey Date: Tue, 17 Jun 2014 14:18:37 +0400 Subject: [PATCH] setPlaceholderFontSize fix --- cocos/ui/UIEditBox/UIEditBox.cpp | 2 +- cocos/ui/UIEditBox/UIEditBoxImplIOS.mm | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cocos/ui/UIEditBox/UIEditBox.cpp b/cocos/ui/UIEditBox/UIEditBox.cpp index 27e4ccc95b..6ef69b9e74 100644 --- a/cocos/ui/UIEditBox/UIEditBox.cpp +++ b/cocos/ui/UIEditBox/UIEditBox.cpp @@ -268,7 +268,7 @@ void EditBox::setPlaceholderFontSize(int fontSize) _placeholderFontSize = fontSize; if (_editBoxImpl != nullptr && _placeholderFontName.length() > 0) { - _editBoxImpl->setPlaceholderFont(_placeholderFontName.c_str(), _fontSize); + _editBoxImpl->setPlaceholderFont(_placeholderFontName.c_str(), fontSize); } } diff --git a/cocos/ui/UIEditBox/UIEditBoxImplIOS.mm b/cocos/ui/UIEditBox/UIEditBoxImplIOS.mm index d78dd0c765..a2456ed125 100644 --- a/cocos/ui/UIEditBox/UIEditBoxImplIOS.mm +++ b/cocos/ui/UIEditBox/UIEditBoxImplIOS.mm @@ -395,8 +395,6 @@ void EditBoxImplIOS::setFont(const char* pFontName, int fontSize) _label->setSystemFontName(pFontName); _label->setSystemFontSize(fontSize); - _labelPlaceHolder->setSystemFontName(pFontName); - _labelPlaceHolder->setSystemFontSize(fontSize); } void EditBoxImplIOS::setFontColor(const Color3B& color) @@ -407,7 +405,8 @@ void EditBoxImplIOS::setFontColor(const Color3B& color) 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)