summaryrefslogtreecommitdiff
path: root/src/gui/window.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2004-12-22 14:33:15 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2004-12-22 14:33:15 +0000
commite591000b3f7c24ebdaa3c46d24068951ce410dfa (patch)
treefddb731d2183bc64e96f69f61e857999c17d9c9b /src/gui/window.cpp
parente47508bf6a5bab7e88ac24a4746c2d4c94faf9c7 (diff)
downloadmana-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.cpp9
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