diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/engine.cpp | 4 | ||||
-rw-r--r-- | src/gui/gui.cpp | 9 | ||||
-rw-r--r-- | src/gui/gui.h | 1 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/engine.cpp b/src/engine.cpp index a79319f1..4c91a688 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -177,7 +177,9 @@ Engine::Engine(): { // Initializes GUI debugInfo = new gcn::Label(); - guiTop->add(debugInfo); + // Oh, come on guichan folks, how useful is it to have a single widget gui? + // (Well, the BasicContainer interface isn't that much more useful... ;) + dynamic_cast<WindowContainer*>(gui->getTop())->add(debugInfo); // Create dialogs chatWindow = new ChatWindow( diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 197177cd..5f37e566 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -56,7 +56,6 @@ extern Being* autoTarget; // Guichan stuff Gui *gui; gcn::SDLInput *guiInput; // GUI input -WindowContainer *guiTop; // The top container // Fonts used in showing hits gcn::ImageFont *hitRedFont; @@ -99,7 +98,7 @@ Gui::Gui(Graphics *graphics): mFocusHandler = new FocusHandler(); // Initialize top GUI widget - guiTop = new WindowContainer(); + WindowContainer *guiTop = new WindowContainer(); guiTop->setDimension(gcn::Rectangle(0, 0, graphics->getWidth(), graphics->getHeight())); guiTop->setOpaque(false); @@ -171,7 +170,7 @@ Gui::~Gui() } delete mGuiFont; - delete guiTop; + delete mTop; delete mImageLoader; if (mHostImageLoader) { @@ -192,8 +191,8 @@ void Gui::logic() void Gui::draw() { - mGraphics->pushClipArea(guiTop->getDimension()); - guiTop->draw(mGraphics); + mGraphics->pushClipArea(mTop->getDimension()); + mTop->draw(mGraphics); int mouseX, mouseY; Uint8 button = SDL_GetMouseState(&mouseX, &mouseY); diff --git a/src/gui/gui.h b/src/gui/gui.h index a8e602ff..80a4ee7d 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -105,7 +105,6 @@ class Gui : public gcn::Gui, public gcn::MouseListener, ConfigListener }; extern Gui *gui; /**< The GUI system */ -extern WindowContainer *guiTop; /**< The top container */ extern gcn::SDLInput *guiInput; /**< GUI input */ /** |