diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-07-16 14:29:42 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-07-16 14:29:42 +0000 |
commit | 51224bed60d5bed45b53e99b44bc1123a2a9cb68 (patch) | |
tree | 2acbf76139b6ef76d21aaf98ee09e326a59c4467 /src/gui/gui.cpp | |
parent | 96e61ed3ff7e41976ac8788363d6df8719037962 (diff) | |
download | mana-51224bed60d5bed45b53e99b44bc1123a2a9cb68.tar.gz mana-51224bed60d5bed45b53e99b44bc1123a2a9cb68.tar.bz2 mana-51224bed60d5bed45b53e99b44bc1123a2a9cb68.tar.xz mana-51224bed60d5bed45b53e99b44bc1123a2a9cb68.zip |
Made Image/SubImage being drawn by Graphics. Removed some redundant code.
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r-- | src/gui/gui.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index ce8f428b..cf98dde9 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -81,7 +81,8 @@ Gui::Gui(Graphics *graphics): // Initialize top GUI widget guiTop = new WindowContainer(); - guiTop->setDimension(gcn::Rectangle(0, 0, screen->w, screen->h)); + guiTop->setDimension(gcn::Rectangle(0, 0, + graphics->getWidth(), graphics->getHeight())); guiTop->setOpaque(false); guiTop->addMouseListener(this); Window::setWindowContainer(guiTop); @@ -214,7 +215,7 @@ void Gui::draw() if ((SDL_GetAppState() & SDL_APPMOUSEFOCUS || button & SDL_BUTTON(1)) && mCustomCursor) { - mMouseCursor->draw(screen, mouseX - 5, mouseY - 2); + guiGraphics->drawImage(mMouseCursor, mouseX - 5, mouseY - 2); } guiGraphics->popClipArea(); |