mirror of
https://github.com/LCEMP/LCEMP.git
synced 2026-05-06 13:54:11 +00:00
fix: sign text crash - enforce 15 char limit
This commit is contained in:
parent
eec4fb7af6
commit
e077f9250f
|
|
@ -46,6 +46,7 @@ UIScene_SignEntryMenu::UIScene_SignEntryMenu(int iPad, void *_initData, UILayer
|
|||
m_signRows[i].SetTitleAndText(IDS_SIGN_TITLE,IDS_SIGN_TITLE_TEXT);
|
||||
#endif
|
||||
m_textInputLines[i].init(m_sign->GetMessage(i).c_str(), i);
|
||||
m_textInputLines[i].SetCharLimit(15);
|
||||
}
|
||||
|
||||
parentLayer->addComponent(iPad,eUIComponent_MenuBackground);
|
||||
|
|
@ -150,6 +151,7 @@ int UIScene_SignEntryMenu::KeyboardCompleteCallback(LPVOID lpParam,bool bRes)
|
|||
uint16_t pchText[128];
|
||||
ZeroMemory(pchText, 128 * sizeof(uint16_t) );
|
||||
InputManager.GetText(pchText);
|
||||
pchText[15] = 0;
|
||||
pClass->m_textInputLines[pClass->m_iEditingLine].setLabel((wchar_t *)pchText);
|
||||
}
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue