diff options
author | Bertram <bertram@cegetel.net> | 2010-03-03 23:38:18 +0100 |
---|---|---|
committer | Bertram <bertram@cegetel.net> | 2010-03-03 23:38:18 +0100 |
commit | 1e52781e7d425cffcc6a5319b4cb5bf5eebe2ea9 (patch) | |
tree | 596305e9bfd4ad8448efd477a43f86490b1974c5 /src/gui/skin.h | |
parent | 8cc31b582f372238ce6bd2c86888d312cf1fe5b2 (diff) | |
parent | f5f7a7d5990d1133f714b6cd431aecf6a332fbd5 (diff) | |
download | mana-client-1e52781e7d425cffcc6a5319b4cb5bf5eebe2ea9.tar.gz mana-client-1e52781e7d425cffcc6a5319b4cb5bf5eebe2ea9.tar.bz2 mana-client-1e52781e7d425cffcc6a5319b4cb5bf5eebe2ea9.tar.xz mana-client-1e52781e7d425cffcc6a5319b4cb5bf5eebe2ea9.zip |
Merge branch 'master' of gitorious.org:mana/mana
Diffstat (limited to 'src/gui/skin.h')
-rw-r--r-- | src/gui/skin.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/gui/skin.h b/src/gui/skin.h index 15d55972..091d3001 100644 --- a/src/gui/skin.h +++ b/src/gui/skin.h @@ -31,6 +31,7 @@ class ConfigListener; class Image; +class ImageSet; class Skin { @@ -101,11 +102,24 @@ class SkinLoader static SkinLoader *instance(); static void deleteInstance(); + static void prepareThemePath(); + static std::string getThemePath() { return mThemePath; } + + /** + * Returns the patch to the given gui resource relative to the theme + * or, if it isn't in the theme, relative to 'graphics/gui'. + */ + static std::string resolveThemePath(const std::string &path); + + static Image *getImageFromTheme(const std::string &path); + static ImageSet *getImageSetFromTheme(const std::string &path, + int w, int h); + /** * Loads a skin. */ Skin *load(const std::string &filename, - const std::string &defaultPath); + const std::string &defaultPath = getThemePath()); /** * Updates the alpha values of all of the skins. @@ -141,8 +155,11 @@ class SkinLoader */ ConfigListener *mSkinConfigListener; + static std::string mThemePath; static SkinLoader *mInstance; + static bool tryThemePath(std::string themePath); + /** * Tells if the current skins opacity * should not get less than the given value |