summaryrefslogtreecommitdiff
path: root/src/gui/setupitem.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-07-03 17:23:05 +0300
committerAndrei Karas <akaras@inbox.ru>2011-07-03 17:23:05 +0300
commitd5eb424dcd214b4646a960e04b9271e70b096856 (patch)
treef36891e6406861ab0d4a82d233545e3f33a46ab4 /src/gui/setupitem.cpp
parent634149ac7d248d2e078ee9707379a5056d31077e (diff)
downloadmanaverse-d5eb424dcd214b4646a960e04b9271e70b096856.tar.gz
manaverse-d5eb424dcd214b4646a960e04b9271e70b096856.tar.bz2
manaverse-d5eb424dcd214b4646a960e04b9271e70b096856.tar.xz
manaverse-d5eb424dcd214b4646a960e04b9271e70b096856.zip
Add separator field to setup settings tabs.
Diffstat (limited to 'src/gui/setupitem.cpp')
-rw-r--r--src/gui/setupitem.cpp54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/gui/setupitem.cpp b/src/gui/setupitem.cpp
index ecd6a9407..e41e9357d 100644
--- a/src/gui/setupitem.cpp
+++ b/src/gui/setupitem.cpp
@@ -111,6 +111,8 @@ void SetupItem::load()
case VINT:
mValue = toString(cfg->getIntValue(mKeyName));
break;
+ case VNONE:
+ break;
}
}
}
@@ -451,3 +453,55 @@ void SetupItemIntTextField::apply(std::string eventName)
fromWidget();
save();
}
+
+SetupItemLabel::SetupItemLabel(std::string text, std::string description,
+ SetupTabScroll *parent, bool separator) :
+ SetupItem(text, description, "", parent, "", "", true),
+ mLabel(0),
+ mIsSeparator(separator)
+{
+ mValueType = VNONE;
+ createControls();
+}
+
+SetupItemLabel::~SetupItemLabel()
+{
+ mWidget = 0;
+ mLabel = 0;
+}
+
+void SetupItemLabel::createControls()
+{
+ if (mIsSeparator)
+ {
+ const std::string str = " \342\200\225\342\200\225\342\200\225"
+ "\342\200\225\342\200\225 ";
+ mLabel = new Label(str + mText + str);
+ }
+ else
+ {
+ mLabel = new Label(mText);
+ }
+
+ mWidget = mLabel;
+ mParent->getContainer()->add(mWidget);
+ mParent->addControl(this);
+ mParent->addActionListener(this);
+ mWidget->addActionListener(this);
+}
+
+void SetupItemLabel::fromWidget()
+{
+}
+
+void SetupItemLabel::toWidget()
+{
+}
+
+void SetupItemLabel::action(const gcn::ActionEvent &event)
+{
+}
+
+void SetupItemLabel::apply(std::string eventName)
+{
+}