summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-12-24 12:54:18 +0300
committerAndrei Karas <akaras@inbox.ru>2012-12-24 12:54:18 +0300
commit4451d65a33fc5f3de52ea86b27dedc16cd26c5fd (patch)
tree8faef13dd1f04ac03f9db4099bdfca768ea0d9a9 /src/gui/widgets
parente04c285de305cc1da568cde431d31dc56009526c (diff)
downloadmanaverse-4451d65a33fc5f3de52ea86b27dedc16cd26c5fd.tar.gz
manaverse-4451d65a33fc5f3de52ea86b27dedc16cd26c5fd.tar.bz2
manaverse-4451d65a33fc5f3de52ea86b27dedc16cd26c5fd.tar.xz
manaverse-4451d65a33fc5f3de52ea86b27dedc16cd26c5fd.zip
Change sliders to dropdowns in visual setup page.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/namesmodel.cpp6
-rw-r--r--src/gui/widgets/namesmodel.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/widgets/namesmodel.cpp b/src/gui/widgets/namesmodel.cpp
index abfcd6def..299eed355 100644
--- a/src/gui/widgets/namesmodel.cpp
+++ b/src/gui/widgets/namesmodel.cpp
@@ -49,3 +49,9 @@ std::string NamesModel::getElementAt(int i)
return mNames[i];
}
+
+void NamesModel::fillFromArray(const char *const *const arr, std::size_t sz)
+{
+ for (int f = 0; f < sz; f ++)
+ mNames.push_back(gettext(arr[f]));
+}
diff --git a/src/gui/widgets/namesmodel.h b/src/gui/widgets/namesmodel.h
index 7f3ba934d..eab9983f3 100644
--- a/src/gui/widgets/namesmodel.h
+++ b/src/gui/widgets/namesmodel.h
@@ -49,6 +49,8 @@ class NamesModel : public gcn::ListModel
void clear()
{ mNames.clear(); }
+ void fillFromArray(const char *const *const arr, std::size_t size);
+
protected:
StringVect mNames;
};