summaryrefslogtreecommitdiff
path: root/src/gui/scrollarea.cpp
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2005-04-10 17:47:54 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2005-04-10 17:47:54 +0000
commitc7bbef9a7b2648803db4693a96f2863f9a29c258 (patch)
tree80d3da8a779c54e25e0d95d2894c0c69889f8987 /src/gui/scrollarea.cpp
parent4a1ba03eab296034ad7c1a06bc2637b5ca3ccbcc (diff)
downloadmana-c7bbef9a7b2648803db4693a96f2863f9a29c258.tar.gz
mana-c7bbef9a7b2648803db4693a96f2863f9a29c258.tar.bz2
mana-c7bbef9a7b2648803db4693a96f2863f9a29c258.tar.xz
mana-c7bbef9a7b2648803db4693a96f2863f9a29c258.zip
adding romulo's buttons to scrollbars
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)