diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-03-27 13:25:04 +0100 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-03-27 13:25:24 +0100 |
commit | dd05447445dc1766e532130318af2cb6bb72a994 (patch) | |
tree | c8b2cbac64ccf9545a39c143088b57fe2cb8e678 /src/gui/skin.h | |
parent | 05e753294c1a603252d2eed4b1731c3f50543a7e (diff) | |
parent | 2aab736bc5d77ffda789d7de56cef100fac207e1 (diff) | |
download | mana-dd05447445dc1766e532130318af2cb6bb72a994.tar.gz mana-dd05447445dc1766e532130318af2cb6bb72a994.tar.bz2 mana-dd05447445dc1766e532130318af2cb6bb72a994.tar.xz mana-dd05447445dc1766e532130318af2cb6bb72a994.zip |
Merge branch 'aethyra/master'
Conflicts:
src/beingmanager.cpp
src/gui/confirm_dialog.cpp
src/gui/inventorywindow.cpp
src/gui/inventorywindow.h
src/gui/label.cpp
src/gui/label.h
src/gui/popup.cpp
src/gui/popup.h
src/gui/scrollarea.cpp
src/gui/skin.cpp
src/gui/skin.h
src/gui/speechbubble.cpp
src/gui/window.cpp
src/gui/window.h
src/localplayer.h
src/main.cpp
src/net/ea/playerhandler.cpp
src/resources/ambientoverlay.h
src/resources/dye.cpp
src/resources/imagewriter.cpp
src/resources/itemdb.cpp
src/shopitem.cpp
Diffstat (limited to 'src/gui/skin.h')
-rw-r--r-- | src/gui/skin.h | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/src/gui/skin.h b/src/gui/skin.h index 21bd84f2..1a603e29 100644 --- a/src/gui/skin.h +++ b/src/gui/skin.h @@ -27,12 +27,14 @@ #include "../graphics.h" +class ConfigListener; class Image; class Skin { public: - Skin(ImageRect skin, Image* close, std::string name = ""); + Skin(ImageRect skin, Image* close, std::string filePath, + std::string name = ""); ~Skin(); /** @@ -43,6 +45,11 @@ class Skin std::string getName() { return mName; } /** + * Returns the skin's xml file path. + */ + std::string getFilePath() { return mFilePath; } + + /** * Returns the background skin. */ ImageRect getBorder() { return border; } @@ -67,9 +74,15 @@ class Skin */ int getMinHeight() const; + /** + * Updates the alpha value of the skin + */ + void updateAlpha(); + int instances; private: + std::string mFilePath; /**< File name path for the skin */ std::string mName; /**< Name of the skin to use */ ImageRect border; /**< The window border and background */ Image *closeImage; /**< Close Button Image */ @@ -84,16 +97,28 @@ typedef Skins::iterator SkinIterator; class SkinLoader { public: + friend class SkinConfigListener; + SkinLoader(); ~SkinLoader(); /** * Loads a skin */ - Skin* load(const std::string &filename); + Skin* load(const std::string &filename, const std::string &defaultPath); + + /** + * Updates the alpha values of all of the skins + */ + void updateAlpha(); private: Skins mSkins; + + /** + * The config listener that listens to changes relevant to all skins. + */ + static ConfigListener *skinConfigListener; }; extern SkinLoader* skinLoader; |