summaryrefslogtreecommitdiff
path: root/src/gui/guiChatConsole.cpp
diff options
context:
space:
mode:
authoryw05 <37980625+yw05@users.noreply.github.com>2021-04-05 15:56:29 +0200
committerGitHub <noreply@github.com>2021-04-05 15:56:29 +0200
commit85163b531f283c52111c3964fd382e4ed1dafeb8 (patch)
tree4d49b0720fe784b30b7566113018fdf4d0213f7d /src/gui/guiChatConsole.cpp
parent23325277659132e95b346307b591c944625bda16 (diff)
downloadminetest-85163b531f283c52111c3964fd382e4ed1dafeb8.tar.gz
minetest-85163b531f283c52111c3964fd382e4ed1dafeb8.tar.bz2
minetest-85163b531f283c52111c3964fd382e4ed1dafeb8.zip
Make edit boxes respond to string input (IME) (#11156)
Make edit boxes respond to string input events (introduced in minetest/irrlicht#23) that are usually triggered by entering text with an IME.
Diffstat (limited to 'src/gui/guiChatConsole.cpp')
-rw-r--r--src/gui/guiChatConsole.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/guiChatConsole.cpp b/src/gui/guiChatConsole.cpp
index b7af0ca0f..baaaea5e8 100644
--- a/src/gui/guiChatConsole.cpp
+++ b/src/gui/guiChatConsole.cpp
@@ -17,6 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+#include "IrrCompileConfig.h"
#include "guiChatConsole.h"
#include "chat.h"
#include "client/client.h"
@@ -618,6 +619,13 @@ bool GUIChatConsole::OnEvent(const SEvent& event)
m_chat_backend->scroll(rows);
}
}
+#if (IRRLICHT_VERSION_MT_REVISION >= 2)
+ else if(event.EventType == EET_STRING_INPUT_EVENT)
+ {
+ prompt.input(std::wstring(event.StringInput.Str->c_str()));
+ return true;
+ }
+#endif
return Parent ? Parent->OnEvent(event) : false;
}