diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-08-14 22:25:54 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-08-14 22:25:54 +0000 |
commit | 8e1c3b592c9ebcec9e006bcc54eea55bfea4a864 (patch) | |
tree | 134de69274dad771a4cd9297a0a0617ed28a0543 /src/gui/gui.cpp | |
parent | 0ce6e9e8400c326e6848688b3b865c84d96e3073 (diff) | |
download | mana-8e1c3b592c9ebcec9e006bcc54eea55bfea4a864.tar.gz mana-8e1c3b592c9ebcec9e006bcc54eea55bfea4a864.tar.bz2 mana-8e1c3b592c9ebcec9e006bcc54eea55bfea4a864.tar.xz mana-8e1c3b592c9ebcec9e006bcc54eea55bfea4a864.zip |
Removed guiGraphics global pointer and removed dependencies on gui.h in some places.
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r-- | src/gui/gui.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 95cd85d7..f77ad0be 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -55,7 +55,6 @@ extern Being* autoTarget; // Guichan stuff Gui *gui; -Graphics *guiGraphics; // Graphics driver gcn::SDLInput *guiInput; // GUI input WindowContainer *guiTop; // The top container @@ -71,8 +70,6 @@ Gui::Gui(Graphics *graphics): mMouseCursor(NULL), mCustomCursor(false) { - guiGraphics = graphics; - //setGraphics(graphics); #ifdef USE_OPENGL if (useOpenGL) { // Set graphics @@ -195,7 +192,7 @@ void Gui::logic() void Gui::draw() { - guiGraphics->pushClipArea(guiTop->getDimension()); + mGraphics->pushClipArea(guiTop->getDimension()); guiTop->draw(mGraphics); int mouseX, mouseY; @@ -204,10 +201,10 @@ void Gui::draw() if ((SDL_GetAppState() & SDL_APPMOUSEFOCUS || button & SDL_BUTTON(1)) && mCustomCursor) { - guiGraphics->drawImage(mMouseCursor, mouseX - 5, mouseY - 2); + dynamic_cast<Graphics*>(mGraphics)->drawImage(mMouseCursor, mouseX - 5, mouseY - 2); } - guiGraphics->popClipArea(); + mGraphics->popClipArea(); } void Gui::mousePress(int mx, int my, int button) |