diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-01-26 01:31:38 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-01-26 01:31:38 +0300 |
commit | 85d58aef208ae7c1f0ef5d449e17a1410a6eb04d (patch) | |
tree | d50ea0b708b9ae00432deb54e4def67e26c0796b /src/gui/setup_perfomance.cpp | |
parent | d1153fc8c1f226d802e82cba7d11c686998a1523 (diff) | |
download | plus-85d58aef208ae7c1f0ef5d449e17a1410a6eb04d.tar.gz plus-85d58aef208ae7c1f0ef5d449e17a1410a6eb04d.tar.bz2 plus-85d58aef208ae7c1f0ef5d449e17a1410a6eb04d.tar.xz plus-85d58aef208ae7c1f0ef5d449e17a1410a6eb04d.zip |
Add support for manual compression selection.
Diffstat (limited to 'src/gui/setup_perfomance.cpp')
-rw-r--r-- | src/gui/setup_perfomance.cpp | 26 |
1 files changed, 23 insertions, 3 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(); |