diff options
author | Constantin Wenger <constantin.wenger@googlemail.com> | 2011-08-02 10:44:25 +0200 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2011-08-05 08:45:15 +0200 |
commit | 0cfca69b42e1a252584367c06a7bcfd6d2781411 (patch) | |
tree | 12a70183df0467be81797e2fd5eef3e994ef49de | |
parent | 1278a57afe6ceb2323bd0ec4a2577ab8dda8a984 (diff) | |
download | minetest-0cfca69b42e1a252584367c06a7bcfd6d2781411.tar.gz minetest-0cfca69b42e1a252584367c06a7bcfd6d2781411.tar.bz2 minetest-0cfca69b42e1a252584367c06a7bcfd6d2781411.zip |
fixed displaying special chars in the keychange menu
-rw-r--r-- | src/guiKeyChangeMenu.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/guiKeyChangeMenu.cpp b/src/guiKeyChangeMenu.cpp index 6e41677ce..cdf32d176 100644 --- a/src/guiKeyChangeMenu.cpp +++ b/src/guiKeyChangeMenu.cpp @@ -76,7 +76,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) recalculateAbsolutePosition(false); v2s32 topleft(0, 0); - + changeCtype(""); { core::rect < s32 > rect(0, 0, 125, 20); rect += topleft + v2s32(25, 3); @@ -303,6 +303,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) Environment->addButton(rect, this, GUI_ID_ABORT_BUTTON, wgettext("Cancel")); } + changeCtype("C"); } void GUIKeyChangeMenu::drawMenu() @@ -417,6 +418,7 @@ bool GUIKeyChangeMenu::OnEvent(const SEvent& event) if (event.EventType == EET_KEY_INPUT_EVENT && activeKey >= 0 && event.KeyInput.PressedDown) { + changeCtype(""); if (activeKey == GUI_ID_KEY_FORWARD_BUTTON) { this->forward->setText( @@ -495,7 +497,7 @@ bool GUIKeyChangeMenu::OnEvent(const SEvent& event) narrow_to_wide(KeyNames[event.KeyInput.Key]).c_str()); this->key_dump = event.KeyInput.Key; } - + changeCtype("C"); activeKey = -1; return true; } @@ -514,6 +516,12 @@ bool GUIKeyChangeMenu::OnEvent(const SEvent& event) } if (event.GUIEvent.EventType == gui::EGET_BUTTON_CLICKED) { + if(event.GUIEvent.Caller->getID() != GUI_ID_BACK_BUTTON && + event.GUIEvent.Caller->getID() != GUI_ID_ABORT_BUTTON) + { + changeCtype(""); + } + switch (event.GUIEvent.Caller->getID()) { case GUI_ID_BACK_BUTTON: //back @@ -590,6 +598,7 @@ bool GUIKeyChangeMenu::OnEvent(const SEvent& event) break; } //Buttons + changeCtype("C"); } } |