Fix cursor stop working after pressing enter

This commit is contained in:
Benau 2018-03-15 10:39:02 +08:00
parent 2e981b33e7
commit f7b3950cd4
2 changed files with 4 additions and 1 deletions

View File

@ -819,7 +819,7 @@ bool CGUIEditBox::processKey(const SEvent& event)
calculateScrollPos();
if (CursorPos > Text.size())
if (CursorPos > (s32)Text.size())
CursorPos = Text.size();
#if defined(_IRR_COMPILE_WITH_WINDOWS_DEVICE_)

View File

@ -68,7 +68,10 @@ public:
for (unsigned int n=0; n<m_listeners.size(); n++)
{
if (m_listeners[n].onEnterPressed(Text))
{
Text = L"";
CursorPos = 0;
}
}
}
return out;