summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-02-19 00:30:24 +0300
committerAndrei Karas <akaras@inbox.ru>2013-02-19 00:30:24 +0300
commite63b10c3a63d93b9a6dfa144624fea8610d7768c (patch)
tree2c537174bb2134ea7b58cbaa6f648c2acd7a8006 /src/game.cpp
parente73c5ecc896c14fa43b19e42e5b24c79766cdb44 (diff)
downloadmanaplus-e63b10c3a63d93b9a6dfa144624fea8610d7768c.tar.gz
manaplus-e63b10c3a63d93b9a6dfa144624fea8610d7768c.tar.bz2
manaplus-e63b10c3a63d93b9a6dfa144624fea8610d7768c.tar.xz
manaplus-e63b10c3a63d93b9a6dfa144624fea8610d7768c.zip
Add support for GM tab.
This tab visible all messages from @wgm chat command and local messages in this tab.
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp6
1 files changed, 6 insertions, 0 deletions
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");