summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/setup_perfomance.cpp26
-rw-r--r--src/gui/setup_perfomance.h8
2 files changed, 30 insertions, 4 deletions
diff --git a/src/gui/setup_perfomance.cpp b/src/gui/setup_perfomance.cpp
index 06838dcb6..9d99f6491 100644
--- a/src/gui/setup_perfomance.cpp
+++ b/src/gui/setup_perfomance.cpp
@@ -31,6 +31,7 @@
#include "gui/widgets/inttextfield.h"
#include "gui/widgets/label.h"
#include "gui/widgets/layouthelper.h"
+#include "gui/widgets/namesmodel.h"
#include "gui/widgets/scrollarea.h"
#include "gui/widgets/setupitem.h"
@@ -41,8 +42,19 @@
#include "debug.h"
+static const int texturesListSize = 4;
+
+static const char *const texturesList[] =
+{
+ N_("no"),
+ N_("s3tc"),
+ N_("fxt1"),
+ N_("ARB")
+};
+
Setup_Perfomance::Setup_Perfomance(const Widget2 *const widget) :
- SetupTabScroll(widget)
+ SetupTabScroll(widget),
+ mTexturesList(new NamesModel)
{
setName(_("Perfomance"));
@@ -103,8 +115,10 @@ Setup_Perfomance::Setup_Perfomance(const Widget2 *const widget) :
new SetupItemLabel(_("Different options (enable or disable can "
"improve perfomance)"), "", this);
- new SetupItemCheckBox(_("Enable texture compression (fast OpenGL)"), "",
- "compresstextures", this, "compresstexturesEvent");
+
+ mTexturesList->fillFromArray(&texturesList[0], texturesListSize);
+ new SetupItemDropDown(_("Enable texture compression (fast OpenGL)"), "",
+ "compresstextures", this, "compresstexturesEvent", mTexturesList, 100);
new SetupItemCheckBox(_("Enable rectangular texture extension (OpenGL)"),
"", "rectangulartextures", this, "rectangulartexturesEvent");
@@ -118,6 +132,12 @@ Setup_Perfomance::Setup_Perfomance(const Widget2 *const widget) :
setDimension(gcn::Rectangle(0, 0, 550, 350));
}
+Setup_Perfomance::~Setup_Perfomance()
+{
+ delete mTexturesList;
+ mTexturesList = nullptr;
+}
+
void Setup_Perfomance::apply()
{
SetupTabScroll::apply();
diff --git a/src/gui/setup_perfomance.h b/src/gui/setup_perfomance.h
index ee6f729fc..7cfcee3b4 100644
--- a/src/gui/setup_perfomance.h
+++ b/src/gui/setup_perfomance.h
@@ -27,8 +27,9 @@
#include <guichan/actionlistener.hpp>
-class IntTextField;
class EditDialog;
+class IntTextField;
+class NamesModel;
class Setup_Perfomance final : public SetupTabScroll
{
@@ -37,7 +38,12 @@ class Setup_Perfomance final : public SetupTabScroll
A_DELETE_COPY(Setup_Perfomance)
+ ~Setup_Perfomance();
+
void apply();
+
+ private:
+ NamesModel *mTexturesList;
};
#endif