MCPcopy Create free account
hub / github.com/axmolengine/axmol / setPasswordText

Method setPasswordText

core/ui/UITextField.cpp:201–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

199}
200
201void UICCTextField::setPasswordText(std::string_view text)
202{
203 std::string tempStr = "";
204 int32_t text_count = StringUtils::countUTF8Chars(text);
205 int32_t max = text_count;
206
207 if (_maxLengthEnabled)
208 {
209 if (text_count > _maxLength)
210 {
211 max = _maxLength;
212 }
213 }
214
215 for (int i = 0; i < max; ++i)
216 {
217 tempStr.append(_passwordStyleText);
218 }
219
220 Label::setString(tempStr);
221}
222
223void UICCTextField::setAttachWithIME(bool attach)
224{

Callers 1

setStringMethod · 0.80

Calls 2

countUTF8CharsFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected