Fix cursor stop working after pressing enter
This commit is contained in:
parent
2e981b33e7
commit
f7b3950cd4
@ -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_)
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user