From e63b10c3a63d93b9a6dfa144624fea8610d7768c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 19 Feb 2013 00:30:24 +0300 Subject: Add support for GM tab. This tab visible all messages from @wgm chat command and local messages in this tab. --- src/game.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/game.cpp') diff --git a/src/game.cpp b/src/game.cpp index d5cebe6a1..798d6010b 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -73,6 +73,7 @@ #include "gui/widgets/battletab.h" #include "gui/widgets/dropshortcutcontainer.h" #include "gui/widgets/emoteshortcutcontainer.h" +#include "gui/widgets/gmtab.h" #include "gui/widgets/itemshortcutcontainer.h" #include "gui/widgets/spellshortcutcontainer.h" #include "gui/widgets/tradetab.h" @@ -153,6 +154,7 @@ ChatTab *localChatTab = nullptr; ChatTab *debugChatTab = nullptr; TradeTab *tradeChatTab = nullptr; BattleTab *battleChatTab = nullptr; +GmTab *gmChatTab = nullptr; const unsigned adjustDelay = 10; @@ -278,6 +280,9 @@ static void createGuiWindows() battleChatTab = nullptr; } + if (player_node && !gmChatTab && player_node->getGMLevel() > 0) + gmChatTab = new GmTab(chatWindow); + if (config.getBoolValue("logToChat")) logger->setChatWindow(chatWindow); @@ -316,6 +321,7 @@ static void destroyGuiWindows() del_0(debugChatTab) del_0(tradeChatTab) del_0(battleChatTab) + del_0(gmChatTab); logger->log("start deleting"); del_0(chatWindow) logger->log("end deleting"); -- cgit v1.2.3-60-g2f50