summaryrefslogtreecommitdiff
path: root/src/gui/scrollarea.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/scrollarea.cpp')
-rw-r--r--src/gui/scrollarea.cpp28
1 files changed, 24 insertions, 4 deletions
diff --git a/src/gui/scrollarea.cpp b/src/gui/scrollarea.cpp
index d652c94c..9d2ccb10 100644
--- a/src/gui/scrollarea.cpp
+++ b/src/gui/scrollarea.cpp
@@ -80,6 +80,11 @@ void ScrollArea::init()
a++;
}
}
+
+ hscrolll = resman->getImage("graphics/gui/hscrolll.png");
+ hscrollr = resman->getImage("graphics/gui/hscrollr.png");
+ vscrolld = resman->getImage("graphics/gui/vscrolld.png");
+ vscrollu = resman->getImage("graphics/gui/vscrollu.png");
}
void ScrollArea::draw(gcn::Graphics *graphics)
@@ -156,22 +161,37 @@ void ScrollArea::drawBorder(gcn::Graphics *graphics)
void ScrollArea::drawUpButton(gcn::Graphics *graphics)
{
- gcn::ScrollArea::drawUpButton(graphics);
+ gcn::Rectangle dim = getUpButtonDimension();
+ int x, y;
+ getAbsolutePosition(x, y);
+ vscrollu->draw(screen, x + dim.x, y + dim.y);
}
void ScrollArea::drawDownButton(gcn::Graphics *graphics)
{
- gcn::ScrollArea::drawDownButton(graphics);
+ gcn::Rectangle dim = getDownButtonDimension();
+ int x, y;
+ getAbsolutePosition(x, y);
+ vscrolld->draw(screen, x + dim.x, y + dim.y);
+
}
void ScrollArea::drawLeftButton(gcn::Graphics *graphics)
{
- gcn::ScrollArea::drawLeftButton(graphics);
+ gcn::Rectangle dim = getLeftButtonDimension();
+ int x, y;
+ getAbsolutePosition(x, y);
+ hscrolll->draw(screen, x + dim.x, y + dim.y);
+
}
void ScrollArea::drawRightButton(gcn::Graphics *graphics)
{
- gcn::ScrollArea::drawRightButton(graphics);
+ gcn::Rectangle dim = getRightButtonDimension();
+ int x, y;
+ getAbsolutePosition(x, y);
+ hscrollr->draw(screen, x + dim.x, y + dim.y);
+
}
void ScrollArea::drawVBar(gcn::Graphics *graphics)