diff options
author | Jared Adams <jaxad0127@gmail.com> | 2010-02-27 21:50:25 -0700 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-02-28 10:30:45 -0700 |
commit | 500ee24e22aae7b457118d152b4480e99969092e (patch) | |
tree | ea0e7e3869a80fbc86cffe97136b926cc7149bdd /src/gui/widgets/scrollarea.cpp | |
parent | 64e742acdb9b0dd9c44bced91766f5ea1aa9de4c (diff) | |
download | mana-500ee24e22aae7b457118d152b4480e99969092e.tar.gz mana-500ee24e22aae7b457118d152b4480e99969092e.tar.bz2 mana-500ee24e22aae7b457118d152b4480e99969092e.tar.xz mana-500ee24e22aae7b457118d152b4480e99969092e.zip |
Make the gui more themeable and distribute two themes
The older gray theme and the new wood theme are available as themes.
The gray theme needs some new graphics for hilights.
Add a theme option for branding and add path/to/branding/data to the
PhysFS search path.
Reviewed-by: Thorbjørn Lindeijer
Reviewed-by: Chuck Miller
Diffstat (limited to 'src/gui/widgets/scrollarea.cpp')
-rw-r--r-- | src/gui/widgets/scrollarea.cpp | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp index b3e28329..dea99e8e 100644 --- a/src/gui/widgets/scrollarea.cpp +++ b/src/gui/widgets/scrollarea.cpp @@ -27,7 +27,6 @@ #include "gui/skin.h" #include "resources/image.h" -#include "resources/resourcemanager.h" #include "utils/dtor.h" @@ -96,8 +95,7 @@ void ScrollArea::init() if (instances == 0) { // Load the background skin - ResourceManager *resman = ResourceManager::getInstance(); - Image *textbox = resman->getImage("graphics/gui/deepbox.png"); + Image *textbox = SkinLoader::getImageFromTheme("deepbox.png"); const int bggridx[4] = {0, 3, 28, 31}; const int bggridy[4] = {0, 3, 28, 31}; int a = 0, x, y; @@ -118,8 +116,8 @@ void ScrollArea::init() textbox->decRef(); // Load vertical scrollbar skin - Image *vscroll = resman->getImage("graphics/gui/vscroll_grey.png"); - Image *vscrollHi = resman->getImage("graphics/gui/vscroll_highlight.png"); + Image *vscroll = SkinLoader::getImageFromTheme("vscroll_grey.png"); + Image *vscrollHi = SkinLoader::getImageFromTheme("vscroll_highlight.png"); int vsgridx[4] = {0, 4, 7, 11}; int vsgridy[4] = {0, 4, 15, 19}; @@ -147,21 +145,21 @@ void ScrollArea::init() vscrollHi->decRef(); buttons[UP][0] = - resman->getImage("graphics/gui/vscroll_up_default.png"); + SkinLoader::getImageFromTheme("vscroll_up_default.png"); buttons[DOWN][0] = - resman->getImage("graphics/gui/vscroll_down_default.png"); + SkinLoader::getImageFromTheme("vscroll_down_default.png"); buttons[LEFT][0] = - resman->getImage("graphics/gui/hscroll_left_default.png"); + SkinLoader::getImageFromTheme("hscroll_left_default.png"); buttons[RIGHT][0] = - resman->getImage("graphics/gui/hscroll_right_default.png"); + SkinLoader::getImageFromTheme("hscroll_right_default.png"); buttons[UP][1] = - resman->getImage("graphics/gui/vscroll_up_pressed.png"); + SkinLoader::getImageFromTheme("vscroll_up_pressed.png"); buttons[DOWN][1] = - resman->getImage("graphics/gui/vscroll_down_pressed.png"); + SkinLoader::getImageFromTheme("vscroll_down_pressed.png"); buttons[LEFT][1] = - resman->getImage("graphics/gui/hscroll_left_pressed.png"); + SkinLoader::getImageFromTheme("hscroll_left_pressed.png"); buttons[RIGHT][1] = - resman->getImage("graphics/gui/hscroll_right_pressed.png"); + SkinLoader::getImageFromTheme("hscroll_right_pressed.png"); } instances++; |