issue #2920: fix indent

This commit is contained in:
boyu0 2014-01-27 18:22:35 +08:00
parent e16e6a8e84
commit 00b5a9add5
1 changed files with 17 additions and 17 deletions

View File

@ -331,24 +331,24 @@ void EditBoxImplIOS::placeInactiveLabels()
void EditBoxImplIOS::setInactiveText(const char* pText) void EditBoxImplIOS::setInactiveText(const char* pText)
{ {
if(_systemControl.textField.secureTextEntry == YES) if(_systemControl.textField.secureTextEntry == YES)
{
std::string passwordString;
for(int i = 0; i < strlen(pText); ++i)
passwordString.append("\u25CF");
_label->setString(passwordString.c_str());
}
else
_label->setString(getText());
// Clip the text width to fit to the text box
float fMaxWidth = _editBox->getContentSize().width - CC_EDIT_BOX_PADDING * 2;
Rect clippingRect = _label->getTextureRect();
if(clippingRect.size.width > fMaxWidth)
{ {
clippingRect.size.width = fMaxWidth; std::string passwordString;
_label->setTextureRect(clippingRect); for(int i = 0; i < strlen(pText); ++i)
} passwordString.append("\u25CF");
_label->setString(passwordString.c_str());
}
else
_label->setString(getText());
// Clip the text width to fit to the text box
float fMaxWidth = _editBox->getContentSize().width - CC_EDIT_BOX_PADDING * 2;
Rect clippingRect = _label->getTextureRect();
if(clippingRect.size.width > fMaxWidth)
{
clippingRect.size.width = fMaxWidth;
_label->setTextureRect(clippingRect);
}
} }
void EditBoxImplIOS::setFont(const char* pFontName, int fontSize) void EditBoxImplIOS::setFont(const char* pFontName, int fontSize)