summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-03-02 13:42:14 +0000
committerJared Adams <jaxad0127@gmail.com>2010-03-02 13:42:14 +0000
commit0c8c8cf7ea63def0d454f30227584a5f3062c013 (patch)
tree9929ddd6c0ecaffef0d75411eeaea2f9fa7fbdfd /src/game.cpp
parent4ff5c3b854215b1f55e70106a4c53225fc953619 (diff)
downloadmana-0c8c8cf7ea63def0d454f30227584a5f3062c013.tar.gz
mana-0c8c8cf7ea63def0d454f30227584a5f3062c013.tar.bz2
mana-0c8c8cf7ea63def0d454f30227584a5f3062c013.tar.xz
mana-0c8c8cf7ea63def0d454f30227584a5f3062c013.zip
Revert "Merge WindowContainer into Viewport and remove extra members"
This reverts commit 67e678094b9fddd21fb3c690130e772937ab2746. Conflicts: src/gui/gui.cpp src/gui/viewport.cpp
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 8558d421..2b9e932e 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -124,6 +124,7 @@ ChannelManager *channelManager = NULL;
CommandHandler *commandHandler = NULL;
Particle *particleEngine = NULL;
EffectManager *effectManager = NULL;
+Viewport *viewport = NULL; /**< Viewport on the map. */
ChatTab *localChatTab = NULL;
@@ -216,10 +217,19 @@ Game::Game():
disconnectedDialog = NULL;
+ // Create the viewport
+ viewport = new Viewport;
+ viewport->setDimension(gcn::Rectangle(0, 0, graphics->getWidth(),
+ graphics->getHeight()));
+
+ gcn::Container *top = static_cast<gcn::Container*>(gui->getTop());
+ top->add(viewport);
+ viewport->requestMoveToBottom();
+
createGuiWindows();
mWindowMenu = new WindowMenu;
- viewport->add(mWindowMenu);
+ windowContainer->add(mWindowMenu);
initEngines();
@@ -266,6 +276,7 @@ Game::~Game()
delete commandHandler;
delete joystick;
delete particleEngine;
+ delete viewport;
delete mCurrentMap;
map_path = "";