diff options
author | Jared Adams <jaxad0127@gmail.com> | 2010-03-02 13:42:14 +0000 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-03-02 13:42:14 +0000 |
commit | 0c8c8cf7ea63def0d454f30227584a5f3062c013 (patch) | |
tree | 9929ddd6c0ecaffef0d75411eeaea2f9fa7fbdfd /src/gui/gui.cpp | |
parent | 4ff5c3b854215b1f55e70106a4c53225fc953619 (diff) | |
download | mana-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/gui/gui.cpp')
-rw-r--r-- | src/gui/gui.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index c5b77704..1e36523c 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -26,9 +26,9 @@ #include "gui/sdlinput.h" #include "gui/skin.h" #include "gui/truetypefont.h" -#include "gui/viewport.h" #include "gui/widgets/window.h" +#include "gui/widgets/windowcontainer.h" #include "configlistener.h" #include "configuration.h" @@ -92,6 +92,15 @@ Gui::Gui(Graphics *graphics): delete mFocusHandler; mFocusHandler = new FocusHandler; + // Initialize top GUI widget + WindowContainer *guiTop = new WindowContainer; + guiTop->setFocusable(true); + guiTop->setDimension(gcn::Rectangle(0, 0, + graphics->getWidth(), graphics->getHeight())); + guiTop->setOpaque(false); + Window::setWindowContainer(guiTop); + setTop(guiTop); + ResourceManager *resman = ResourceManager::getInstance(); // Set global font @@ -124,14 +133,6 @@ Gui::Gui(Graphics *graphics): gcn::Widget::setGlobalFont(mGuiFont); - // Initialize top GUI widget - Viewport *guiTop = new Viewport; - guiTop->setFocusable(true); - guiTop->setDimension(gcn::Rectangle(0, 0, - graphics->getWidth(), graphics->getHeight())); - guiTop->setOpaque(false); - setTop(guiTop); - // Initialize mouse cursor and listen for changes to the option setUseCustomCursor(config.getValue("customcursor", 1) == 1); mConfigListener = new GuiConfigListener(this); |