summaryrefslogtreecommitdiff
path: root/src/gui/skin.h
diff options
context:
space:
mode:
authorBertram <bertram@cegetel.net>2009-09-02 23:40:45 +0200
committerBertram <bertram@cegetel.net>2009-09-02 23:40:45 +0200
commitefb541eeef2ad839c885c494c3a065f1f7d5dc03 (patch)
treef8f912a1aa62dfd902153a8dcb3e9d1549ae8e7c /src/gui/skin.h
parent63049c5bf3ed38c3cb67edf740ed67f7fed663dd (diff)
downloadmana-client-efb541eeef2ad839c885c494c3a065f1f7d5dc03.tar.gz
mana-client-efb541eeef2ad839c885c494c3a065f1f7d5dc03.tar.bz2
mana-client-efb541eeef2ad839c885c494c3a065f1f7d5dc03.tar.xz
mana-client-efb541eeef2ad839c885c494c3a065f1f7d5dc03.zip
Added a minimum alpha opacity value handle in SkinLoader and made use of it.
Part 1 of 3 for Mantis #847 Only a few controls follow minimum opacity value at login stage. Part 2 will make all other controls do the same. Part 3 will try to set default gui opacity value as a constant.
Diffstat (limited to 'src/gui/skin.h')
-rw-r--r--src/gui/skin.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/gui/skin.h b/src/gui/skin.h
index c56072d3..5f612c26 100644
--- a/src/gui/skin.h
+++ b/src/gui/skin.h
@@ -82,7 +82,7 @@ class Skin
/**
* Updates the alpha value of the skin
*/
- void updateAlpha();
+ void updateAlpha(float minimumOpacityAllowed = 0.0f);
int instances;
@@ -95,7 +95,7 @@ class Skin
Image *mStickyImageDown; /**< Sticky Button Image */
};
-class SkinLoader
+class SkinLoader
{
public:
static SkinLoader *instance();
@@ -112,6 +112,18 @@ class SkinLoader
*/
void updateAlpha();
+ /**
+ * Get the minimum opacity allowed to skins.
+ */
+ float getMinimumOpacity()
+ { return mMinimumOpacity; }
+
+ /**
+ * Set the minimum opacity allowed to skins.
+ * Set a negative value to free the minimum allowed.
+ */
+ void setMinimumOpacity(float minimumOpacity);
+
private:
SkinLoader();
~SkinLoader();
@@ -130,6 +142,12 @@ class SkinLoader
ConfigListener *mSkinConfigListener;
static SkinLoader *mInstance;
+
+ /**
+ * Tells if the current skins opacity
+ * should not get less than the given value
+ */
+ float mMinimumOpacity;
};
#endif