diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-01-15 17:49:01 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-01-15 17:49:01 +0000 |
commit | 8ed926ea15e8f151b8b81f93a5dccd0d53cf7ca1 (patch) | |
tree | 800d8d02db775b5f263eaee92c5cbf021d800e9f /src/gui/window.cpp | |
parent | c92d7c1188febd7c5af15fa710ab06c3af4dede5 (diff) | |
download | mana-client-8ed926ea15e8f151b8b81f93a5dccd0d53cf7ca1.tar.gz mana-client-8ed926ea15e8f151b8b81f93a5dccd0d53cf7ca1.tar.bz2 mana-client-8ed926ea15e8f151b8b81f93a5dccd0d53cf7ca1.tar.xz mana-client-8ed926ea15e8f151b8b81f93a5dccd0d53cf7ca1.zip |
Cleaned up includes, separated engine from graphics and single buffer now
used throughout application, cleaned up shop functions.
Diffstat (limited to 'src/gui/window.cpp')
-rw-r--r-- | src/gui/window.cpp | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/src/gui/window.cpp b/src/gui/window.cpp index 9c08df9c..665295cb 100644 --- a/src/gui/window.cpp +++ b/src/gui/window.cpp @@ -107,27 +107,18 @@ void Window::draw(gcn::Graphics* graphics) getWidth(), getHeight() - titlebarHeight + 1)); // Skinned dialog render - if (typeid(*graphics) == typeid(gcn::AllegroGraphics)) - { - gcn::AllegroGraphics *gfx = (gcn::AllegroGraphics*)graphics; - BITMAP *screen = gfx->getTarget(); - int x, y; - getAbsolutePosition(x, y); - - // Draw title bar - dLeft->draw(screen, x, y); - dMid->drawPattern(screen, - x + dLeft->getWidth(), y, - getWidth() - dLeft->getWidth() - dRight->getWidth(), - dMid->getHeight()); - dRight->draw(screen, x + getWidth() - dRight->getWidth(), y); - } - else { - // Plain title bar - graphics->setColor(titlebarColor); - graphics->fillRectangle(gcn::Rectangle(0, 0, - getWidth(), titlebarHeight)); - } + Graphics *gfx = (Graphics*)graphics; + BITMAP *screen = gfx->getTarget(); + int x, y; + getAbsolutePosition(x, y); + + // Draw title bar + dLeft->draw(screen, x, y); + dMid->drawPattern(screen, + x + dLeft->getWidth(), y, + getWidth() - dLeft->getWidth() - dRight->getWidth(), + dMid->getHeight()); + dRight->draw(screen, x + getWidth() - dRight->getWidth(), y); // Draw title graphics->setFont(getFont()); |