summaryrefslogtreecommitdiff
path: root/src/gui/slider.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2005-07-16 14:29:42 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2005-07-16 14:29:42 +0000
commit51224bed60d5bed45b53e99b44bc1123a2a9cb68 (patch)
tree2acbf76139b6ef76d21aaf98ee09e326a59c4467 /src/gui/slider.cpp
parent96e61ed3ff7e41976ac8788363d6df8719037962 (diff)
downloadmana-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/slider.cpp')
-rw-r--r--src/gui/slider.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/slider.cpp b/src/gui/slider.cpp
index 6bbe1bed..2d4e6c78 100644
--- a/src/gui/slider.cpp
+++ b/src/gui/slider.cpp
@@ -108,15 +108,16 @@ void Slider::draw(gcn::Graphics *graphics)
y += (h - hStart->getHeight()) / 2;
- hStart->draw(screen, x, y);
+ dynamic_cast<Graphics*>(graphics)->drawImage(hStart, x, y);
w -= hStart->getWidth() + hEnd->getWidth();
x += hStart->getWidth();
- hMid->drawPattern(screen, x, y, w, hMid->getHeight());
+ dynamic_cast<Graphics*>(graphics)->drawImagePattern(
+ hMid, x, y, w, hMid->getHeight());
x += w;
- hEnd->draw(screen, x, y);
+ dynamic_cast<Graphics*>(graphics)->drawImage(hEnd, x, y);
drawMarker(graphics);
}
@@ -130,5 +131,5 @@ void Slider::drawMarker(gcn::Graphics *graphics)
x += getMarkerPosition();
y += (h - hGrip->getHeight()) / 2;
- hGrip->draw(screen, x, y);
+ dynamic_cast<Graphics*>(graphics)->drawImage(hGrip, x, y);
}