diff options
author | Ira Rice <irarice@gmail.com> | 2009-02-03 16:33:18 -0700 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-02-03 16:33:18 -0700 |
commit | 7d45452187b1c2911b688bbed5fb8981a67b1934 (patch) | |
tree | 173857b19d0662837a48178739412aec908b040e /src/gui/widgets/dropdown.h | |
parent | 8857a59c3818c1ce6eeb6c054cb5543bfc35c087 (diff) | |
download | mana-7d45452187b1c2911b688bbed5fb8981a67b1934.tar.gz mana-7d45452187b1c2911b688bbed5fb8981a67b1934.tar.bz2 mana-7d45452187b1c2911b688bbed5fb8981a67b1934.tar.xz mana-7d45452187b1c2911b688bbed5fb8981a67b1934.zip |
Modified the dropdown class to handle opacity.
Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/gui/widgets/dropdown.h')
-rw-r--r-- | src/gui/widgets/dropdown.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/gui/widgets/dropdown.h b/src/gui/widgets/dropdown.h index 25ae05f8..bff8bd1e 100644 --- a/src/gui/widgets/dropdown.h +++ b/src/gui/widgets/dropdown.h @@ -56,7 +56,8 @@ class DropDown : public gcn::DropDown */ DropDown(gcn::ListModel *listModel = NULL, gcn::ScrollArea *scrollArea = NULL, - gcn::ListBox *listBox = NULL); + gcn::ListBox *listBox = NULL, + bool opacity = true); /** * Destructor. @@ -67,6 +68,22 @@ class DropDown : public gcn::DropDown void drawFrame(gcn::Graphics* graphics); + /** + * Sets the widget to be opaque, that is sets the widget to display its + * background. + * + * @param opaque True if the widget should be opaque, false otherwise. + */ + void setOpaque(bool opaque) {mOpaque = opaque;} + + /** + * Checks if the widget is opaque, that is if the widget area displays + * its background. + * + * @return True if the widget is opaque, false otherwise. + */ + bool isOpaque() const {return mOpaque;} + protected: /** @@ -80,6 +97,9 @@ class DropDown : public gcn::DropDown static int instances; static Image *buttons[2][2]; static ImageRect skin; + static float mAlpha; + + bool mOpaque; }; #endif // end DROPDOWN_H |