1
0
mirror of https://github.com/moparisthebest/minetest synced 2024-11-15 13:55:11 -05:00

Send KEY_END when (re)creating a text input

This ensures that on creation and when resizing the cursor is at the end
of the text rather than at the beginnig.
This commit is contained in:
Giuseppe Bilotta 2011-08-13 18:56:15 +02:00
parent 0488bf54d3
commit 42134bb49e

View File

@ -103,6 +103,12 @@ void GUITextInputMenu::regenerateGui(v2u32 screensize)
gui::IGUIElement *e =
Environment->addEditBox(text.c_str(), rect, true, this, 256);
Environment->setFocus(e);
irr::SEvent evt;
evt.EventType = EET_KEY_INPUT_EVENT;
evt.KeyInput.Key = KEY_END;
evt.KeyInput.PressedDown = true;
e->OnEvent(evt);
}
changeCtype("");
{