mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-20 09:57:09 +00:00
Increase maximum name length from 64 to 100 characters so players can have longer world names
This commit is contained in:
parent
8db8236662
commit
7daa4134ec
|
|
@ -53,7 +53,7 @@ void NameEntryScreen::buttonClicked(Button button)
|
||||||
void NameEntryScreen::keyPressed(wchar_t ch, int eventKey)
|
void NameEntryScreen::keyPressed(wchar_t ch, int eventKey)
|
||||||
{
|
{
|
||||||
if (eventKey == Keyboard::KEY_BACK && name.length() > 0) name = name.substr(0, name.length() - 1);
|
if (eventKey == Keyboard::KEY_BACK && name.length() > 0) name = name.substr(0, name.length() - 1);
|
||||||
if (allowedChars.find(ch) != wstring::npos && name.length()<64)
|
if (allowedChars.find(ch) != wstring::npos && name.length()<100)
|
||||||
{
|
{
|
||||||
name += ch;
|
name += ch;
|
||||||
}
|
}
|
||||||
|
|
@ -75,4 +75,4 @@ void NameEntryScreen::render(int xm, int ym, float a)
|
||||||
drawString(font, name + (frame / 6 % 2 == 0 ? L"_" : L""), bx + 4, by + (bh - 8) / 2, 0xe0e0e0);
|
drawString(font, name + (frame / 6 % 2 == 0 ? L"_" : L""), bx + 4, by + (bh - 8) / 2, 0xe0e0e0);
|
||||||
|
|
||||||
Screen::render(xm, ym, a);
|
Screen::render(xm, ym, a);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue