diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-03-28 10:35:49 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-03-28 10:35:49 -0600 |
commit | 42a095de15649f0f00ef6c681268d6623205900c (patch) | |
tree | 1f7d509f088208fd5349e9a77d208637354636f3 /src/gui/skin.h | |
parent | ef2e1bafa7c5f19b0353e0bf01a7ad9d7f8cddf5 (diff) | |
download | mana-42a095de15649f0f00ef6c681268d6623205900c.tar.gz mana-42a095de15649f0f00ef6c681268d6623205900c.tar.bz2 mana-42a095de15649f0f00ef6c681268d6623205900c.tar.xz mana-42a095de15649f0f00ef6c681268d6623205900c.zip |
Add a sticky button to the Window class
The Minimap window uses this so you can froce it to always be open. The
Minimap toggle button can be used to show or hide it temporarily, as
warping will reset it's visibility based on the sticky state and weather
the 'new' map has a minimap.
Diffstat (limited to 'src/gui/skin.h')
-rw-r--r-- | src/gui/skin.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gui/skin.h b/src/gui/skin.h index df905b05..30f7f360 100644 --- a/src/gui/skin.h +++ b/src/gui/skin.h @@ -34,7 +34,7 @@ class Image; class Skin { public: - Skin(ImageRect skin, Image *close, + Skin(ImageRect skin, Image *close, Image *stickyUp, Image *stickyDown, const std::string &filePath, const std::string &name = ""); @@ -63,6 +63,12 @@ class Skin Image *getCloseImage() const { return closeImage; } /** + * Returns the image used by a sticky button for this skin. + */ + Image *getStickyImage(bool state) const + { return state ? stickyImageDown : stickyImageUp; } + + /** * Returns the number of instances which use this skin. */ int getNumberOfInstances() const { return instances; } @@ -89,6 +95,8 @@ class Skin std::string mName; /**< Name of the skin to use */ ImageRect border; /**< The window border and background */ Image *closeImage; /**< Close Button Image */ + Image *stickyImageUp; /**< Sticky Button Image */ + Image *stickyImageDown; /**< Sticky Button Image */ }; // Map containing all window skins |