diff options
author | Weblate <42@minetest.ru> | 2013-06-21 10:24:16 +0200 |
---|---|---|
committer | Weblate <42@minetest.ru> | 2013-06-21 10:24:16 +0200 |
commit | 3af90db5b51da0c37f77fe6410e488c8c27acd67 (patch) | |
tree | 12edd6f0661b464e36863517241b5ec0b87b5ec1 /src/guiChatConsole.cpp | |
parent | 58f3cd3eb598a7cf79983fe9e48c738591c6e004 (diff) | |
parent | b1ebd9f79c63cf78b0e0fb2ea6f52d82cdfb95b6 (diff) | |
download | minetest-3af90db5b51da0c37f77fe6410e488c8c27acd67.tar.gz minetest-3af90db5b51da0c37f77fe6410e488c8c27acd67.tar.bz2 minetest-3af90db5b51da0c37f77fe6410e488c8c27acd67.zip |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src/guiChatConsole.cpp')
-rw-r--r-- | src/guiChatConsole.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/guiChatConsole.cpp b/src/guiChatConsole.cpp index 3dfd0090a..daec18efc 100644 --- a/src/guiChatConsole.cpp +++ b/src/guiChatConsole.cpp @@ -134,6 +134,11 @@ void GUIChatConsole::openConsole(f32 height) reformatConsole(); } +bool GUIChatConsole::isOpen() const +{ + return m_open; +} + bool GUIChatConsole::isOpenInhibited() const { return m_open_inhibited > 0; @@ -545,7 +550,13 @@ bool GUIChatConsole::OnEvent(const SEvent& event) } else if(event.KeyInput.Char != 0 && !event.KeyInput.Control) { - m_chat_backend->getPrompt().input(event.KeyInput.Char); + #if (defined(linux) || defined(__linux)) + wchar_t wc = L'_'; + mbtowc( &wc, (char *) &event.KeyInput.Char, sizeof(event.KeyInput.Char) ); + m_chat_backend->getPrompt().input(wc); + #else + m_chat_backend->getPrompt().input(event.KeyInput.Char); + #endif return true; } } |