summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-07-31 23:20:54 +0300
committerAndrei Karas <akaras@inbox.ru>2014-07-31 23:20:54 +0300
commit33ef923235aeabd07308816bb07ef790cc6c1024 (patch)
treee50c8bbefae98bc57e5b804ba145bca2005c5ca7 /src/game.cpp
parentb6bd4b5d68df33d12f18a67de2e54e016a0935fe (diff)
downloadplus-33ef923235aeabd07308816bb07ef790cc6c1024.tar.gz
plus-33ef923235aeabd07308816bb07ef790cc6c1024.tar.bz2
plus-33ef923235aeabd07308816bb07ef790cc6c1024.tar.xz
plus-33ef923235aeabd07308816bb07ef790cc6c1024.zip
Move popup related code from viewport into popupManager.
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/game.cpp b/src/game.cpp
index f5b146a99..4e2977232 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -53,6 +53,7 @@
#include "gui/chatconsts.h"
#include "gui/dialogsmanager.h"
#include "gui/gui.h"
+#include "gui/popupmanager.h"
#include "gui/viewport.h"
#include "gui/windowmanager.h"
#include "gui/windowmenu.h"
@@ -965,8 +966,11 @@ void Game::changeMap(const std::string &mapPath)
ResourceManager *const resman = ResourceManager::getInstance();
resman->cleanProtected();
- if (viewport)
- viewport->clearPopup();
+ if (popupManager)
+ {
+ popupManager->clearPopup();
+ popupManager->closePopupMenu();
+ }
// Clean up floor items, beings and particles
if (actorManager)
@@ -975,10 +979,7 @@ void Game::changeMap(const std::string &mapPath)
// Close the popup menu on map change so that invalid options can't be
// executed.
if (viewport)
- {
- viewport->closePopupMenu();
viewport->cleanHoverItems();
- }
// Unset the map of the player so that its particles are cleared before
// being deleted in the next step