diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-08-01 12:43:06 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-08-01 13:37:39 +0300 |
commit | 1c87a896376d62131d9df1fee1bd7cec79e21aa6 (patch) | |
tree | 9852dd6458abc9eba4448120793b437ecf38a3e6 /src/gui/chatwindow.cpp | |
parent | b1555ac1dae6f0e0aaa88ca7dd1431de87a8e811 (diff) | |
download | ManaVerse-1c87a896376d62131d9df1fee1bd7cec79e21aa6.tar.gz ManaVerse-1c87a896376d62131d9df1fee1bd7cec79e21aa6.tar.bz2 ManaVerse-1c87a896376d62131d9df1fee1bd7cec79e21aa6.tar.xz ManaVerse-1c87a896376d62131d9df1fee1bd7cec79e21aa6.zip |
add gui for in chat emotes.
For add in chat emote press F1 inside opened chat,
then select and click emote.
Diffstat (limited to 'src/gui/chatwindow.cpp')
-rw-r--r-- | src/gui/chatwindow.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/gui/chatwindow.cpp b/src/gui/chatwindow.cpp index fe6194b23..521877ca3 100644 --- a/src/gui/chatwindow.cpp +++ b/src/gui/chatwindow.cpp @@ -37,6 +37,7 @@ #include "spellshortcut.h" #include "soundmanager.h" +#include "gui/emotewindow.h" #include "gui/gui.h" #include "gui/setup.h" #include "gui/sdlfont.h" @@ -251,6 +252,9 @@ ChatWindow::ChatWindow(): setTitleBarHeight(getPadding() + getTitlePadding()); + if (emoteWindow) + emoteWindow->addListeners(this); + mChatTabs->enableScrollButtons(true); mChatTabs->setFollowDownScroll(true); mChatTabs->setResizeHeight(false); @@ -481,6 +485,18 @@ void ChatWindow::action(const gcn::ActionEvent &event) setVisible(false); } } + else if (eventId == "emote") + { + if (emoteWindow) + { + const std::string str = emoteWindow->getSelectedEmote(); + if (!str.empty()) + { + addInputText(str, false); + emoteWindow->clearEmote(); + } + } + } else if (eventId == ACTION_COLOR_PICKER) { if (mColorPicker) @@ -849,6 +865,10 @@ void ChatWindow::keyPressed(gcn::KeyEvent &event) std::string temp; switch (key) { + case Key::F1: + if (emoteWindow) + emoteWindow->show(); + break; caseKey(Key::F2, "\u2318"); caseKey(Key::F3, "\u263A"); caseKey(Key::F4, "\u2665"); |