From d9a77eb8ac5d507665cbf8b20f5d8187148ebfd1 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 14 Dec 2013 16:59:21 +0300 Subject: Improve a bit separate images drawing. --- src/gui/widgets/slider.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/gui/widgets/slider.cpp') diff --git a/src/gui/widgets/slider.cpp b/src/gui/widgets/slider.cpp index 20fc6b21b..47d4e2215 100644 --- a/src/gui/widgets/slider.cpp +++ b/src/gui/widgets/slider.cpp @@ -204,7 +204,7 @@ void Slider::draw(gcn::Graphics *graphics) { if (!mHasMouse) { - g->drawImage(buttons[0].grid[HSTART], x, y); + DRAW_IMAGE(g, buttons[0].grid[HSTART], x, y); const int width = buttons[0].grid[HSTART]->getWidth(); w -= width + buttons[0].grid[HEND]->getWidth(); x += width; @@ -216,18 +216,18 @@ void Slider::draw(gcn::Graphics *graphics) } x += w; - g->drawImage(buttons[0].grid[HEND], x, y); + DRAW_IMAGE(g, buttons[0].grid[HEND], x, y); const Image *const img = buttons[0].grid[HGRIP]; if (img) { - g->drawImage(img, getMarkerPosition(), + DRAW_IMAGE(g, img, getMarkerPosition(), (mDimension.height - img->getHeight()) / 2); } } else { - g->drawImage(buttons[1].grid[HSTART], x, y); + DRAW_IMAGE(g, buttons[1].grid[HSTART], x, y); const int width = buttons[1].grid[HSTART]->getWidth(); w -= width; @@ -243,12 +243,12 @@ void Slider::draw(gcn::Graphics *graphics) x += w; if (buttons[1].grid[HEND]) - g->drawImage(buttons[1].grid[HEND], x, y); + DRAW_IMAGE(g, buttons[1].grid[HEND], x, y); const Image *const img = buttons[1].grid[HGRIP]; if (img) { - g->drawImage(img, getMarkerPosition(), + DRAW_IMAGE(g, img, getMarkerPosition(), (mDimension.height - img->getHeight()) / 2); } } -- cgit v1.2.3-70-g09d2