From 10b06419ab454e8931a9b6502029bc298e8bce35 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Thu, 23 Dec 2010 22:35:53 +0200 Subject: changes to handing of digging (non backwards-compatible i guess) --- src/guiTextInputMenu.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/guiTextInputMenu.cpp') diff --git a/src/guiTextInputMenu.cpp b/src/guiTextInputMenu.cpp index 0668aa7b3..787680bc5 100644 --- a/src/guiTextInputMenu.cpp +++ b/src/guiTextInputMenu.cpp @@ -37,6 +37,8 @@ GUITextInputMenu::GUITextInputMenu(gui::IGUIEnvironment* env, GUITextInputMenu::~GUITextInputMenu() { removeChildren(); + if(m_dest) + delete m_dest; } void GUITextInputMenu::removeChildren() @@ -173,6 +175,16 @@ bool GUITextInputMenu::OnEvent(const SEvent& event) break; } } + if(event.GUIEvent.EventType==gui::EGET_EDITBOX_ENTER) + { + switch(event.GUIEvent.Caller->getID()) + { + case 256: + acceptInput(); + quitMenu(); + break; + } + } } return Parent ? Parent->OnEvent(event) : false; -- cgit v1.2.3