From 42a095de15649f0f00ef6c681268d6623205900c Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Sat, 28 Mar 2009 10:35:49 -0600 Subject: 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. --- src/gui/skin.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/gui/skin.h') 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 = ""); @@ -62,6 +62,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. */ @@ -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 -- cgit v1.2.3-60-g2f50