diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-03-22 01:42:08 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-03-22 01:42:08 +0300 |
commit | 392b20563409d8f56fb9940c622a195f0ee0f7c7 (patch) | |
tree | 86746ddcec8599882e77098d3d9cfd2d185e5b06 /src/game.cpp | |
parent | 69b548e10a24332cb2f62d04ad4645df786f771c (diff) | |
download | mv-392b20563409d8f56fb9940c622a195f0ee0f7c7.tar.gz mv-392b20563409d8f56fb9940c622a195f0ee0f7c7.tar.bz2 mv-392b20563409d8f56fb9940c622a195f0ee0f7c7.tar.xz mv-392b20563409d8f56fb9940c622a195f0ee0f7c7.zip |
Add language tab class.
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/game.cpp b/src/game.cpp index d2537c091..5eed2bd38 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -75,6 +75,7 @@ #include "gui/widgets/emoteshortcutcontainer.h" #include "gui/widgets/gmtab.h" #include "gui/widgets/itemshortcutcontainer.h" +#include "gui/widgets/langtab.h" #include "gui/widgets/spellshortcutcontainer.h" #include "gui/widgets/tradetab.h" @@ -88,6 +89,7 @@ #include "resources/resourcemanager.h" #include "utils/gettext.h" +#include "utils/langs.h" #include "utils/mkdir.h" #include "utils/physfstools.h" #include "utils/process.h" @@ -155,6 +157,7 @@ ChatTab *debugChatTab = nullptr; TradeTab *tradeChatTab = nullptr; BattleTab *battleChatTab = nullptr; GmTab *gmChatTab = nullptr; +LangTab *langChatTab = nullptr; const unsigned adjustDelay = 10; @@ -257,6 +260,16 @@ static void createGuiWindows() if (config.getBoolValue("showChatHistory")) localChatTab->loadFromLogFile("#General"); + if (serverVersion >= 8) + { + const std::string lang = getLangShort(); + if (lang.size() == 2) + { + langChatTab = new LangTab(chatWindow, lang); + langChatTab->setAllowHighlight(false); + } + } + debugChatTab = new ChatTab(chatWindow, _("Debug"), ""); debugChatTab->setAllowHighlight(false); |