summaryrefslogtreecommitdiff
path: root/src/localplayer.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/localplayer.cpp
parent64e742acdb9b0dd9c44bced91766f5ea1aa9de4c (diff)
downloadmana-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/localplayer.cpp')
-rw-r--r--src/localplayer.cpp24
1 files changed, 9 insertions, 15 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 8ce03bba..750c8c45 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -43,6 +43,7 @@
#include "gui/ministatus.h"
#include "gui/palette.h"
#include "gui/skilldialog.h"
+#include "gui/skin.h"
#include "gui/statuswindow.h"
#include "gui/storagewindow.h"
@@ -1050,18 +1051,12 @@ void LocalPlayer::handleStatusEffect(StatusEffect *effect, int effectId)
void LocalPlayer::initTargetCursor()
{
// Load target cursors
- loadTargetCursor("graphics/gui/target-cursor-blue-s.png", 44, 35,
- false, TC_SMALL);
- loadTargetCursor("graphics/gui/target-cursor-red-s.png", 44, 35,
- true, TC_SMALL);
- loadTargetCursor("graphics/gui/target-cursor-blue-m.png", 62, 44,
- false, TC_MEDIUM);
- loadTargetCursor("graphics/gui/target-cursor-red-m.png", 62, 44,
- true, TC_MEDIUM);
- loadTargetCursor("graphics/gui/target-cursor-blue-l.png", 82, 60,
- false, TC_LARGE);
- loadTargetCursor("graphics/gui/target-cursor-red-l.png", 82, 60,
- true, TC_LARGE);
+ loadTargetCursor("target-cursor-blue-s.png", 44, 35, false, TC_SMALL);
+ loadTargetCursor("target-cursor-red-s.png", 44, 35, true, TC_SMALL);
+ loadTargetCursor("target-cursor-blue-m.png", 62, 44, false, TC_MEDIUM);
+ loadTargetCursor("target-cursor-red-m.png", 62, 44, true, TC_MEDIUM);
+ loadTargetCursor("target-cursor-blue-l.png", 82, 60, false, TC_LARGE);
+ loadTargetCursor("target-cursor-red-l.png", 82, 60, true, TC_LARGE);
}
void LocalPlayer::loadTargetCursor(const std::string &filename,
@@ -1071,9 +1066,8 @@ void LocalPlayer::loadTargetCursor(const std::string &filename,
assert(size > -1);
assert(size < 3);
- ResourceManager *resman = ResourceManager::getInstance();
-
- ImageSet *currentImageSet = resman->getImageSet(filename, width, height);
+ ImageSet *currentImageSet = SkinLoader::getImageSetFromTheme(filename,
+ width, height);
Animation *anim = new Animation;
for (unsigned int i = 0; i < currentImageSet->size(); ++i)