diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-08-25 18:06:19 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-08-25 18:06:19 +0000 |
commit | 2c7d0b3518d72a7ab0726b72f7d2137e5944f049 (patch) | |
tree | 7080b1e32df54b8b44875df3609e94888939eb89 /src/gui/slider.cpp | |
parent | 529ba0581833b05921d8dc3336b02a3c6abd511a (diff) | |
download | mana-2c7d0b3518d72a7ab0726b72f7d2137e5944f049.tar.gz mana-2c7d0b3518d72a7ab0726b72f7d2137e5944f049.tar.bz2 mana-2c7d0b3518d72a7ab0726b72f7d2137e5944f049.tar.xz mana-2c7d0b3518d72a7ab0726b72f7d2137e5944f049.zip |
Made our drawImage() method respect the clip area from the guichan graphics part. Removed some (now) obsolete code. Fixed compilation errors.
Diffstat (limited to 'src/gui/slider.cpp')
-rw-r--r-- | src/gui/slider.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/gui/slider.cpp b/src/gui/slider.cpp index 088b2794..98efc409 100644 --- a/src/gui/slider.cpp +++ b/src/gui/slider.cpp @@ -106,10 +106,8 @@ void Slider::draw(gcn::Graphics *graphics) { int w = getWidth(); int h = getHeight(); - int x, y; - getAbsolutePosition(x, y); - - y += (h - hStart->getHeight()) / 2; + int x = 0; + int y = (h - hStart->getHeight()) / 2; dynamic_cast<Graphics*>(graphics)->drawImage(hStart, x, y); @@ -127,12 +125,6 @@ void Slider::draw(gcn::Graphics *graphics) void Slider::drawMarker(gcn::Graphics *graphics) { - int h = getHeight(); - int x, y; - getAbsolutePosition(x, y); - - x += getMarkerPosition(); - y += (h - hGrip->getHeight()) / 2; - - dynamic_cast<Graphics*>(graphics)->drawImage(hGrip, x, y); + dynamic_cast<Graphics*>(graphics)->drawImage(hGrip, + getMarkerPosition(), (getHeight() - hGrip->getHeight()) / 2); } |