diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-05-18 16:17:08 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-05-18 16:17:08 +0300 |
commit | ea28a76cfbace0ccc8d25e523b410f2dea339423 (patch) | |
tree | c5582fe4d9b26dc381ef90ed7a155ea050514243 /src/gui/popupmenu.cpp | |
parent | 8fdbbe936fc0bb99b0c3d851b7a5b522514ba2b9 (diff) | |
download | ManaVerse-ea28a76cfbace0ccc8d25e523b410f2dea339423.tar.gz ManaVerse-ea28a76cfbace0ccc8d25e523b410f2dea339423.tar.bz2 ManaVerse-ea28a76cfbace0ccc8d25e523b410f2dea339423.tar.xz ManaVerse-ea28a76cfbace0ccc8d25e523b410f2dea339423.zip |
add new chat commands.
/enablehighlight - enable sound hightlight in chat tab
/disablehighlight - disable sound hightlight in chat tab
Diffstat (limited to 'src/gui/popupmenu.cpp')
-rw-r--r-- | src/gui/popupmenu.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp index 4aaa0cf01..53a8a11f7 100644 --- a/src/gui/popupmenu.cpp +++ b/src/gui/popupmenu.cpp @@ -23,6 +23,7 @@ #include "gui/popupmenu.h" #include "actorspritemanager.h" +#include "commandhandler.h" #include "dropshortcut.h" #include "game.h" #include "guild.h" @@ -1198,7 +1199,8 @@ void PopupMenu::handleLink(const std::string &link, } else if (link == "chat close" && mTab) { - mTab->handleCommand("close", ""); + if (commandHandler) + commandHandler->invokeCommand("close", "", mTab); } else if (link == "leave party" && mTab) { @@ -1316,15 +1318,13 @@ void PopupMenu::handleLink(const std::string &link, } else if (link == "enable highlight" && mTab) { - mTab->setAllowHighlight(true); - if (chatWindow) - chatWindow->saveState(); + if (commandHandler) + commandHandler->invokeCommand("enablehighlight", "", mTab); } else if (link == "disable highlight" && mTab) { - mTab->setAllowHighlight(false); - if (chatWindow) - chatWindow->saveState(); + if (commandHandler) + commandHandler->invokeCommand("disablehighlight", "", mTab); } else if (link == "dont remove name" && mTab) { |