summaryrefslogtreecommitdiff
path: root/src/guiTextInputMenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/guiTextInputMenu.cpp')
-rw-r--r--src/guiTextInputMenu.cpp12
1 files changed, 12 insertions, 0 deletions
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;