diff options
Diffstat (limited to 'src/gui/windows/chatwindow.cpp')
-rw-r--r-- | src/gui/windows/chatwindow.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp index d81775b43..6e4cb591e 100644 --- a/src/gui/windows/chatwindow.cpp +++ b/src/gui/windows/chatwindow.cpp @@ -68,12 +68,16 @@ #include "render/opengl/opengldebug.h" +#include "resources/db/textdb.h" + #include "net/chathandler.h" #include "net/serverfeatures.h" #include "utils/copynpaste.h" #include "utils/delete2.h" +#include "utils/translation/podict.h" + #include <sys/stat.h> #include <sstream> @@ -497,6 +501,20 @@ void ChatWindow::action(const ActionEvent &event) } } } + else if (eventId == "text") + { + if (emoteWindow && reverseDictionary) + { + const int idx = emoteWindow->getSelectedTextIndex(); + if (idx >= 0) + { + const std::string str = TextDb::getByIndex(idx); + const std::string enStr = reverseDictionary->getStr(str); + addInputText(enStr, false); + } + emoteWindow->clearText(); + } + } else if (eventId == ACTION_COLOR_PICKER) { if (mColorPicker) |