summaryrefslogtreecommitdiff
path: root/src/gui/widgets/button.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-02-27 21:50:25 -0700
committerJared Adams <jaxad0127@gmail.com>2010-02-28 10:30:45 -0700
commit500ee24e22aae7b457118d152b4480e99969092e (patch)
treeea0e7e3869a80fbc86cffe97136b926cc7149bdd /src/gui/widgets/button.cpp
parent64e742acdb9b0dd9c44bced91766f5ea1aa9de4c (diff)
downloadmana-client-500ee24e22aae7b457118d152b4480e99969092e.tar.gz
mana-client-500ee24e22aae7b457118d152b4480e99969092e.tar.bz2
mana-client-500ee24e22aae7b457118d152b4480e99969092e.tar.xz
mana-client-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/button.cpp')
-rw-r--r--src/gui/widgets/button.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp
index 6589c96e..36a47859 100644
--- a/src/gui/widgets/button.cpp
+++ b/src/gui/widgets/button.cpp
@@ -28,7 +28,6 @@
#include "gui/skin.h"
#include "resources/image.h"
-#include "resources/resourcemanager.h"
#include "utils/dtor.h"
@@ -54,10 +53,10 @@ struct ButtonData
};
static ButtonData const data[BUTTON_COUNT] = {
- { "graphics/gui/button.png", 0, 0 },
- { "graphics/gui/buttonhi.png", 9, 4 },
- { "graphics/gui/buttonpress.png", 16, 19 },
- { "graphics/gui/button_disabled.png", 25, 23 }
+ { "button.png", 0, 0 },
+ { "buttonhi.png", 9, 4 },
+ { "buttonpress.png", 16, 19 },
+ { "button_disabled.png", 25, 23 }
};
ImageRect Button::button[BUTTON_COUNT];
@@ -85,14 +84,13 @@ void Button::init()
if (mInstances == 0)
{
// Load the skin
- ResourceManager *resman = ResourceManager::getInstance();
Image *btn[BUTTON_COUNT];
int a, x, y, mode;
for (mode = 0; mode < BUTTON_COUNT; mode++)
{
- btn[mode] = resman->getImage(data[mode].file);
+ btn[mode] = SkinLoader::getImageFromTheme(data[mode].file);
a = 0;
for (y = 0; y < 3; y++)
{