diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-08-28 13:20:56 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-08-29 00:18:56 +0300 |
commit | 72cc5d13430dff4e41c77482eebd9e5e421fe739 (patch) | |
tree | 60faa271d866cb464f2ed15892605001eb84253a /src | |
parent | e71b8c2bd9722aae29ed36b78806867964a3121d (diff) | |
download | manaplus-72cc5d13430dff4e41c77482eebd9e5e421fe739.tar.gz manaplus-72cc5d13430dff4e41c77482eebd9e5e421fe739.tar.bz2 manaplus-72cc5d13430dff4e41c77482eebd9e5e421fe739.tar.xz manaplus-72cc5d13430dff4e41c77482eebd9e5e421fe739.zip |
allow open help and did you know window before login into game.
Diffstat (limited to 'src')
-rw-r--r-- | src/client.cpp | 9 | ||||
-rw-r--r-- | src/game.cpp | 4 | ||||
-rw-r--r-- | src/inputmanager.h | 1 | ||||
-rw-r--r-- | src/keyboarddata.h | 4 |
4 files changed, 12 insertions, 6 deletions
diff --git a/src/client.cpp b/src/client.cpp index a04a20512..a4d77298d 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -54,7 +54,9 @@ #include "gui/charselectdialog.h" #include "gui/confirmdialog.h" #include "gui/connectiondialog.h" +#include "gui/didyouknowwindow.h" #include "gui/gui.h" +#include "gui/helpwindow.h" #include "gui/logindialog.h" #include "gui/okdialog.h" #include "gui/quitdialog.h" @@ -631,6 +633,8 @@ void Client::gameInit() userPalette = new UserPalette; setupWindow = new Setup; + helpWindow = new HelpWindow; + didYouKnowWindow = new DidYouKnowWindow; soundManager.playMusic(branding.getValue( "loginMusic", "Magick - Real.ogg")); @@ -746,6 +750,11 @@ void Client::gameClear() logger->log1("Quitting1"); config.removeListeners(this); + userPalette = nullptr; + setupWindow = nullptr; + helpWindow = nullptr; + didYouKnowWindow = nullptr; + SDL_RemoveTimer(mLogicCounterId); SDL_RemoveTimer(mSecondsCounterId); diff --git a/src/game.cpp b/src/game.cpp index 962d8562e..0993ef34d 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -215,7 +215,6 @@ static void createGuiWindows() shopWindow = new ShopWindow; skillDialog = new SkillDialog; minimap = new Minimap; - helpWindow = new HelpWindow; debugWindow = new DebugWindow; itemShortcutWindow = new ShortcutWindow( "ItemShortcut", "items.xml", 83, 460); @@ -225,7 +224,6 @@ static void createGuiWindows() itemShortcutWindow->addTab(toString(f + 1), new ItemShortcutContainer(f)); } - didYouKnowWindow = new DidYouKnowWindow; if (config.getBoolValue("showDidYouKnow")) { didYouKnowWindow->setVisible(true); @@ -355,7 +353,6 @@ static void destroyGuiWindows() del_0(equipmentWindow) del_0(beingEquipmentWindow) del_0(tradeWindow) - del_0(helpWindow) del_0(debugWindow) del_0(itemShortcutWindow) del_0(emoteShortcutWindow) @@ -370,7 +367,6 @@ static void destroyGuiWindows() del_0(questsWindow); del_0(whoIsOnline); del_0(killStats); - del_0(didYouKnowWindow); if (auctionManager && AuctionManager::getEnableAuctionBot()) auctionManager->reload(); diff --git a/src/inputmanager.h b/src/inputmanager.h index d3c245379..3e2ab8e41 100644 --- a/src/inputmanager.h +++ b/src/inputmanager.h @@ -87,6 +87,7 @@ enum KeyCondition COND_NOFOLLOW = 1024, // follow mode disabled COND_INGAME = 2048, // game must be started COND_SHORTCUT = 2 + 4 + 16 + 512 + 2048, // flags for shortcut keys + COND_SHORTCUT0 = 2 + 4 + 16 + 512, // flags for shortcut keys COND_GAME = 2 + 4 + 8 + 16 + 64 + 2048, // main game key COND_GAME2 = 2 + 8 + 16 + 64 + 2048 }; diff --git a/src/keyboarddata.h b/src/keyboarddata.h index c22ca08fc..42291c648 100644 --- a/src/keyboarddata.h +++ b/src/keyboarddata.h @@ -368,7 +368,7 @@ static const KeyData keyData[Input::KEY_TOTAL] = { Input::GRP_DEFAULT | Input::GRP_GUI, &ActionManager::helpWindowShow, Input::KEY_NO_VALUE, 50, - COND_SHORTCUT}, + COND_SHORTCUT0}, {"keyWindowStatus", INPUT_KEYBOARD, SDLK_F2, INPUT_UNKNOWN, Input::KEY_NO_VALUE, @@ -501,7 +501,7 @@ static const KeyData keyData[Input::KEY_TOTAL] = { Input::GRP_DEFAULT | Input::GRP_GUI, &ActionManager::didYouKnowWindowShow, Input::KEY_NO_VALUE, 50, - COND_GAME | COND_NOTARGET}, + COND_SHORTCUT0}, {"keyWindowQuests", INPUT_KEYBOARD, SDLK_LEFTBRACKET, INPUT_UNKNOWN, Input::KEY_NO_VALUE, |