summaryrefslogtreecommitdiff
path: root/src/guiChatConsole.cpp
diff options
context:
space:
mode:
authorWeblate <42@minetest.ru>2013-06-21 10:24:16 +0200
committerWeblate <42@minetest.ru>2013-06-21 10:24:16 +0200
commit3af90db5b51da0c37f77fe6410e488c8c27acd67 (patch)
tree12edd6f0661b464e36863517241b5ec0b87b5ec1 /src/guiChatConsole.cpp
parent58f3cd3eb598a7cf79983fe9e48c738591c6e004 (diff)
parentb1ebd9f79c63cf78b0e0fb2ea6f52d82cdfb95b6 (diff)
downloadminetest-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.cpp13
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;
}
}