diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-06-30 18:37:33 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-06-30 19:06:13 +0300 |
commit | a5426222cb3447e92a7051cbfe7ec8777648e4ee (patch) | |
tree | 873721c32cec0780fe1131ca4607342d2ffa6347 /src/gui/windows | |
parent | 35002b57f36c1ea66daada6a3a0ef05ef37512ec (diff) | |
download | manaverse-a5426222cb3447e92a7051cbfe7ec8777648e4ee.tar.gz manaverse-a5426222cb3447e92a7051cbfe7ec8777648e4ee.tar.bz2 manaverse-a5426222cb3447e92a7051cbfe7ec8777648e4ee.tar.xz manaverse-a5426222cb3447e92a7051cbfe7ec8777648e4ee.zip |
Allow open chat window with debug tab before connecting to game.
Diffstat (limited to 'src/gui/windows')
-rw-r--r-- | src/gui/windows/chatwindow.cpp | 8 | ||||
-rw-r--r-- | src/gui/windows/chatwindow.h | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp index eea0905cf..279d1c712 100644 --- a/src/gui/windows/chatwindow.cpp +++ b/src/gui/windows/chatwindow.cpp @@ -89,7 +89,7 @@ ChatWindow *chatWindow = nullptr; static const char *const ACTION_COLOR_PICKER = "color picker"; -ChatWindow::ChatWindow() : +ChatWindow::ChatWindow(const std::string &name) : // TRANSLATORS: chat window name Window(_("Chat"), Modal_false, nullptr, "chat.xml"), ActionListener(), @@ -127,7 +127,7 @@ ChatWindow::ChatWindow() : mEnableTradeFilter(config.getBoolValue("enableTradeFilter")), mTmpVisible(false) { - setWindowName("Chat"); + setWindowName(name); if (setupWindow != nullptr) setupWindow->registerWindowForReset(this); @@ -669,7 +669,9 @@ void ChatWindow::chatInput(const std::string &message) const } if (tab != nullptr) tab->chatInput(msg); - Game::instance()->setValidSpeed(); + Game *const game = Game::instance(); + if (game) + game->setValidSpeed(); } void ChatWindow::localChatInput(const std::string &msg) const diff --git a/src/gui/windows/chatwindow.h b/src/gui/windows/chatwindow.h index 3191c4072..2961af9a1 100644 --- a/src/gui/windows/chatwindow.h +++ b/src/gui/windows/chatwindow.h @@ -64,7 +64,7 @@ class ChatWindow final : public Window, /** * Constructor. */ - ChatWindow(); + ChatWindow(const std::string &name); A_DELETE_COPY(ChatWindow) |