mirror of https://github.com/axmolengine/axmol.git
issue #2920: fix indent
This commit is contained in:
parent
e16e6a8e84
commit
00b5a9add5
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue