summaryrefslogtreecommitdiff
path: root/src/gui/skin.h
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-03-28 10:35:49 -0600
committerJared Adams <jaxad0127@gmail.com>2009-03-28 10:35:49 -0600
commit42a095de15649f0f00ef6c681268d6623205900c (patch)
tree1f7d509f088208fd5349e9a77d208637354636f3 /src/gui/skin.h
parentef2e1bafa7c5f19b0353e0bf01a7ad9d7f8cddf5 (diff)
downloadmana-client-42a095de15649f0f00ef6c681268d6623205900c.tar.gz
mana-client-42a095de15649f0f00ef6c681268d6623205900c.tar.bz2
mana-client-42a095de15649f0f00ef6c681268d6623205900c.tar.xz
mana-client-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.h10
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