From b1f8a2eaab592b59b5946bdbe38f0d8f775cc434 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 15 Aug 2011 23:04:44 +0300 Subject: Add drop down widget for setup pages. Known issue: popup listbox drawed under other widgets. --- src/gui/widgets/setupitem.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'src/gui/widgets/setupitem.h') 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 -- cgit v1.2.3-60-g2f50