diff options
author | Perttu Ahola <celeron55@gmail.com> | 2010-12-23 22:35:53 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2010-12-23 22:35:53 +0200 |
commit | 10b06419ab454e8931a9b6502029bc298e8bce35 (patch) | |
tree | f8dedc838957537e0ee9efc627c695afccb3c9f2 /src/guiTextInputMenu.cpp | |
parent | 61b5a353849f8c8a188c4f91c1aa89c9e7a1d10a (diff) | |
download | minetest-10b06419ab454e8931a9b6502029bc298e8bce35.tar.gz minetest-10b06419ab454e8931a9b6502029bc298e8bce35.tar.bz2 minetest-10b06419ab454e8931a9b6502029bc298e8bce35.zip |
changes to handing of digging (non backwards-compatible i guess)
Diffstat (limited to 'src/guiTextInputMenu.cpp')
-rw-r--r-- | src/guiTextInputMenu.cpp | 12 |
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; |