diff options
-rw-r--r-- | data/graphics/gui/hscroll_left_default.png (renamed from data/graphics/gui/vscroll_left_default.png) | bin | 358 -> 358 bytes | |||
-rw-r--r-- | data/graphics/gui/hscroll_left_highlight.png (renamed from data/graphics/gui/vscroll_left_highlight.png) | bin | 364 -> 364 bytes | |||
-rw-r--r-- | data/graphics/gui/hscroll_left_pressed.png (renamed from data/graphics/gui/vscroll_left_pressed.png) | bin | 349 -> 349 bytes | |||
-rw-r--r-- | data/graphics/gui/hscroll_right_default.png (renamed from data/graphics/gui/vscroll_right_default.png) | bin | 340 -> 340 bytes | |||
-rw-r--r-- | data/graphics/gui/hscroll_right_highlight.png (renamed from data/graphics/gui/vscroll_right_highlight.png) | bin | 359 -> 359 bytes | |||
-rw-r--r-- | data/graphics/gui/hscroll_right_pressed.png (renamed from data/graphics/gui/vscroll_right_pressed.png) | bin | 350 -> 350 bytes | |||
-rw-r--r-- | src/gui/scrollarea.cpp | 32 | ||||
-rw-r--r-- | src/gui/scrollarea.h | 7 |
8 files changed, 29 insertions, 10 deletions
diff --git a/data/graphics/gui/vscroll_left_default.png b/data/graphics/gui/hscroll_left_default.png Binary files differindex 2f763d30..2f763d30 100644 --- a/data/graphics/gui/vscroll_left_default.png +++ b/data/graphics/gui/hscroll_left_default.png diff --git a/data/graphics/gui/vscroll_left_highlight.png b/data/graphics/gui/hscroll_left_highlight.png Binary files differindex 6be5ae25..6be5ae25 100644 --- a/data/graphics/gui/vscroll_left_highlight.png +++ b/data/graphics/gui/hscroll_left_highlight.png diff --git a/data/graphics/gui/vscroll_left_pressed.png b/data/graphics/gui/hscroll_left_pressed.png Binary files differindex b8ebcb46..b8ebcb46 100644 --- a/data/graphics/gui/vscroll_left_pressed.png +++ b/data/graphics/gui/hscroll_left_pressed.png diff --git a/data/graphics/gui/vscroll_right_default.png b/data/graphics/gui/hscroll_right_default.png Binary files differindex 33fdddd0..33fdddd0 100644 --- a/data/graphics/gui/vscroll_right_default.png +++ b/data/graphics/gui/hscroll_right_default.png diff --git a/data/graphics/gui/vscroll_right_highlight.png b/data/graphics/gui/hscroll_right_highlight.png Binary files differindex e9e633ea..e9e633ea 100644 --- a/data/graphics/gui/vscroll_right_highlight.png +++ b/data/graphics/gui/hscroll_right_highlight.png diff --git a/data/graphics/gui/vscroll_right_pressed.png b/data/graphics/gui/hscroll_right_pressed.png Binary files differindex 53972f2b..53972f2b 100644 --- a/data/graphics/gui/vscroll_right_pressed.png +++ b/data/graphics/gui/hscroll_right_pressed.png diff --git a/src/gui/scrollarea.cpp b/src/gui/scrollarea.cpp index 9d2ccb10..033a9450 100644 --- a/src/gui/scrollarea.cpp +++ b/src/gui/scrollarea.cpp @@ -81,10 +81,14 @@ void ScrollArea::init() } } - 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"); + hscroll_left_default = resman->getImage("graphics/gui/hscroll_left_default.png"); + hscroll_right_default = resman->getImage("graphics/gui/hscroll_right_default.png"); + vscroll_down_default = resman->getImage("graphics/gui/vscroll_down_default.png"); + vscroll_up_default = resman->getImage("graphics/gui/vscroll_up_default.png"); + hscroll_left_pressed = resman->getImage("graphics/gui/hscroll_left_pressed.png"); + hscroll_right_pressed = resman->getImage("graphics/gui/hscroll_right_pressed.png"); + vscroll_down_pressed = resman->getImage("graphics/gui/vscroll_down_pressed.png"); + vscroll_up_pressed = resman->getImage("graphics/gui/vscroll_up_pressed.png"); } void ScrollArea::draw(gcn::Graphics *graphics) @@ -164,7 +168,10 @@ void ScrollArea::drawUpButton(gcn::Graphics *graphics) gcn::Rectangle dim = getUpButtonDimension(); int x, y; getAbsolutePosition(x, y); - vscrollu->draw(screen, x + dim.x, y + dim.y); + if (mUpButtonPressed) + vscroll_up_pressed->draw(screen, x + dim.x, y + dim.y); + else + vscroll_up_default->draw(screen, x + dim.x, y + dim.y); } void ScrollArea::drawDownButton(gcn::Graphics *graphics) @@ -172,7 +179,10 @@ void ScrollArea::drawDownButton(gcn::Graphics *graphics) gcn::Rectangle dim = getDownButtonDimension(); int x, y; getAbsolutePosition(x, y); - vscrolld->draw(screen, x + dim.x, y + dim.y); + if (mDownButtonPressed) + vscroll_down_pressed->draw(screen, x + dim.x, y + dim.y); + else + vscroll_down_default->draw(screen, x + dim.x, y + dim.y); } @@ -181,7 +191,10 @@ void ScrollArea::drawLeftButton(gcn::Graphics *graphics) gcn::Rectangle dim = getLeftButtonDimension(); int x, y; getAbsolutePosition(x, y); - hscrolll->draw(screen, x + dim.x, y + dim.y); + if (mLeftButtonPressed) + hscroll_left_pressed->draw(screen, x + dim.x, y + dim.y); + else + hscroll_left_default->draw(screen, x + dim.x, y + dim.y); } @@ -190,7 +203,10 @@ void ScrollArea::drawRightButton(gcn::Graphics *graphics) gcn::Rectangle dim = getRightButtonDimension(); int x, y; getAbsolutePosition(x, y); - hscrollr->draw(screen, x + dim.x, y + dim.y); + if (mRightButtonPressed) + hscroll_right_pressed->draw(screen, x + dim.x, y + dim.y); + else + hscroll_right_default->draw(screen, x + dim.x, y + dim.y); } diff --git a/src/gui/scrollarea.h b/src/gui/scrollarea.h index 56bbbe26..26c87e0e 100644 --- a/src/gui/scrollarea.h +++ b/src/gui/scrollarea.h @@ -72,8 +72,11 @@ class ScrollArea : public gcn::ScrollArea { ImageRect background; ImageRect vMarker; - Image *hscrolll, *hscrollr, *vscrolld, *vscrollu; - float guiAlpha; + Image *hscroll_left_default, *hscroll_right_default, + *vscroll_down_default, *vscroll_up_default; + Image *hscroll_left_pressed, *hscroll_right_pressed, + *vscroll_down_pressed, *vscroll_up_pressed; + float guiAlpha; }; #endif |