fixed #2068: Updating source format.

This commit is contained in:
James Chen 2013-04-19 09:55:29 +08:00
parent b91c5f099c
commit 9ecaacf59b
1 changed files with 27 additions and 27 deletions

View File

@ -288,26 +288,26 @@ void CCTextFieldTTF::setColorSpaceHolder(const ccColor3B& color)
// input text property // input text property
void CCTextFieldTTF::setString(const char *text) void CCTextFieldTTF::setString(const char *text)
{ {
static char bulletString[] = {0xe2, 0x80, 0xa2, 0x00}; static char bulletString[] = {0xe2, 0x80, 0xa2, 0x00};
std::string displayText; std::string displayText;
int length; int length;
CC_SAFE_DELETE(m_pInputText); CC_SAFE_DELETE(m_pInputText);
if (text) if (text)
{ {
m_pInputText = new std::string(text); m_pInputText = new std::string(text);
displayText = *m_pInputText; displayText = *m_pInputText;
if (m_bSecureTextEntry) if (m_bSecureTextEntry)
{ {
displayText = ""; displayText = "";
length = m_pInputText->length(); length = m_pInputText->length();
while (length) while (length)
{ {
displayText.append(bulletString); displayText.append(bulletString);
--length; --length;
} }
} }
} }
else else
{ {
@ -350,16 +350,16 @@ const char * CCTextFieldTTF::getPlaceHolder(void)
// secureTextEntry // secureTextEntry
void CCTextFieldTTF::setSecureTextEntry(bool value) void CCTextFieldTTF::setSecureTextEntry(bool value)
{ {
if (m_bSecureTextEntry != value) if (m_bSecureTextEntry != value)
{ {
m_bSecureTextEntry = value; m_bSecureTextEntry = value;
setString(getString()); setString(getString());
} }
} }
bool CCTextFieldTTF::isSecureTextEntry() bool CCTextFieldTTF::isSecureTextEntry()
{ {
return m_bSecureTextEntry; return m_bSecureTextEntry;
} }
NS_CC_END NS_CC_END