summaryrefslogtreecommitdiff
path: root/src/gui/widgets/setupitem.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-08-15 23:04:44 +0300
committerAndrei Karas <akaras@inbox.ru>2011-08-16 00:24:50 +0300
commitb1f8a2eaab592b59b5946bdbe38f0d8f775cc434 (patch)
tree96d80ba45ad1ddaf5038d983b90365854efb4753 /src/gui/widgets/setupitem.h
parentdec741233dc709950fe542bcd4f69b254b33eb80 (diff)
downloadmanaverse-b1f8a2eaab592b59b5946bdbe38f0d8f775cc434.tar.gz
manaverse-b1f8a2eaab592b59b5946bdbe38f0d8f775cc434.tar.bz2
manaverse-b1f8a2eaab592b59b5946bdbe38f0d8f775cc434.tar.xz
manaverse-b1f8a2eaab592b59b5946bdbe38f0d8f775cc434.zip
Add drop down widget for setup pages.
Known issue: popup listbox drawed under other widgets.
Diffstat (limited to 'src/gui/widgets/setupitem.h')
-rw-r--r--src/gui/widgets/setupitem.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/gui/widgets/setupitem.h b/src/gui/widgets/setupitem.h
index 3396edea3..15d2d41ea 100644
--- a/src/gui/widgets/setupitem.h
+++ b/src/gui/widgets/setupitem.h
@@ -42,6 +42,7 @@
class CheckBox;
class Configuration;
class ContainerPlacer;
+class DropDown;
class EditDialog;
class HorizontContainer;
class IntTextField;
@@ -241,4 +242,32 @@ class SetupItemLabel : public SetupItem
bool mIsSeparator;
};
+class SetupItemDropDown : public SetupItem
+{
+ public:
+ SetupItemDropDown(std::string text, std::string description,
+ std::string keyName, SetupTabScroll *parent,
+ std::string eventName, gcn::ListModel *model,
+ bool mainConfig = true);
+
+ SetupItemDropDown(std::string text, std::string description,
+ std::string keyName, SetupTabScroll *parent,
+ std::string eventName, gcn::ListModel *model,
+ std::string def, bool mainConfig = true);
+
+ ~SetupItemDropDown();
+
+ void createControls();
+
+ void fromWidget();
+
+ void toWidget();
+
+ protected:
+ HorizontContainer *mHorizont;
+ Label *mLabel;
+ gcn::ListModel *mModel;
+ DropDown *mDropDown;
+};
+
#endif