From 8ed926ea15e8f151b8b81f93a5dccd0d53cf7ca1 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sat, 15 Jan 2005 17:49:01 +0000 Subject: Cleaned up includes, separated engine from graphics and single buffer now used throughout application, cleaned up shop functions. --- src/gui/window.cpp | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) (limited to 'src/gui/window.cpp') 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()); -- cgit v1.2.3-70-g09d2