summaryrefslogtreecommitdiff
path: root/src/gui/widgets/dropdown.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-02-09 23:47:02 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-02-09 23:47:02 +0100
commitfa2f3ac593a792c32095c2e885665ec91bb4019d (patch)
treef44aee845f0229dfcc6b2ad3c74613e0352f36c2 /src/gui/widgets/dropdown.h
parent07f7d52f661a74e6d0c780ca53e724651e3dcc48 (diff)
parent40edf4e91558cffd83d9015a2cf4a16360e27855 (diff)
downloadmana-fa2f3ac593a792c32095c2e885665ec91bb4019d.tar.gz
mana-fa2f3ac593a792c32095c2e885665ec91bb4019d.tar.bz2
mana-fa2f3ac593a792c32095c2e885665ec91bb4019d.tar.xz
mana-fa2f3ac593a792c32095c2e885665ec91bb4019d.zip
Merged with Aethyra master as of 2009-02-09
Conflicts: A lot of files...
Diffstat (limited to 'src/gui/widgets/dropdown.h')
-rw-r--r--src/gui/widgets/dropdown.h29
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