diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2004-12-22 14:33:15 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2004-12-22 14:33:15 +0000 |
commit | e591000b3f7c24ebdaa3c46d24068951ce410dfa (patch) | |
tree | fddb731d2183bc64e96f69f61e857999c17d9c9b /src/gui/window.cpp | |
parent | e47508bf6a5bab7e88ac24a4746c2d4c94faf9c7 (diff) | |
download | mana-e591000b3f7c24ebdaa3c46d24068951ce410dfa.tar.gz mana-e591000b3f7c24ebdaa3c46d24068951ce410dfa.tar.bz2 mana-e591000b3f7c24ebdaa3c46d24068951ce410dfa.tar.xz mana-e591000b3f7c24ebdaa3c46d24068951ce410dfa.zip |
Fixed window titlebar drawing.
Diffstat (limited to 'src/gui/window.cpp')
-rw-r--r-- | src/gui/window.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gui/window.cpp b/src/gui/window.cpp index 75208350..d39bc590 100644 --- a/src/gui/window.cpp +++ b/src/gui/window.cpp @@ -85,18 +85,17 @@ void Window::draw(gcn::Graphics* graphics) { gcn::AllegroGraphics *gfx = (gcn::AllegroGraphics*)graphics; BITMAP *screen = gfx->getTarget(); - int x, y; + int x, y, i; getAbsolutePosition(x, y); // Draw title bar masked_blit(dLeft, screen, 0, 0, x, y, 24, 24); - for (int i = 1; i <= (getDimension().width - 24) / 24; i++) + for (i = 24; i < getWidth() - 24; i += 24) { - blit(dMid, screen, 0, 0, x + i * 24, y, 24, 24); + blit(dMid, screen, 0, 0, x + i, y, 24, 24); } masked_blit(dRight, screen, 0, 0, - x + getDimension().width - 24, y, - 24, 24); + x + getWidth() - 24, y, 24, 24); } else { // Plain title bar |