diff options
Diffstat (limited to 'src/gui/widgets/dropdown.h')
-rw-r--r-- | src/gui/widgets/dropdown.h | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/src/gui/widgets/dropdown.h b/src/gui/widgets/dropdown.h index 25ae05f8..e5919dc7 100644 --- a/src/gui/widgets/dropdown.h +++ b/src/gui/widgets/dropdown.h @@ -22,15 +22,8 @@ #ifndef DROPDOWN_H #define DROPDOWN_H -#include <iosfwd> - #include <guichan/widgets/dropdown.hpp> -#include "../listbox.h" -#include "../scrollarea.h" - -#include "../../guichanfwd.h" - class Image; class ImageRect; @@ -56,7 +49,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 +61,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 +90,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 |