mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-24 15:01:16 +01:00
Qt/EnhancementsWidget: Convert texture filtering option to a ComboBox.
This commit is contained in:
parent
8a3b8a925e
commit
ff2cc4d02b
@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
#include <QGridLayout>
|
#include <QGridLayout>
|
||||||
#include <QGroupBox>
|
#include <QGroupBox>
|
||||||
#include <QHBoxLayout>
|
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
@ -77,6 +76,9 @@ void EnhancementsWidget::CreateWidgets()
|
|||||||
m_aa_combo = new ToolTipComboBox();
|
m_aa_combo = new ToolTipComboBox();
|
||||||
m_af_combo = new GraphicsChoice({tr("1x"), tr("2x"), tr("4x"), tr("8x"), tr("16x")},
|
m_af_combo = new GraphicsChoice({tr("1x"), tr("2x"), tr("4x"), tr("8x"), tr("16x")},
|
||||||
Config::GFX_ENHANCE_MAX_ANISOTROPY);
|
Config::GFX_ENHANCE_MAX_ANISOTROPY);
|
||||||
|
m_texture_filtering_combo =
|
||||||
|
new GraphicsChoice({tr("Default"), tr("Force Nearest"), tr("Force Linear")},
|
||||||
|
Config::GFX_ENHANCE_FORCE_TEXTURE_FILTERING);
|
||||||
|
|
||||||
m_pp_effect = new ToolTipComboBox();
|
m_pp_effect = new ToolTipComboBox();
|
||||||
m_configure_pp_effect = new NonDefaultQPushButton(tr("Configure"));
|
m_configure_pp_effect = new NonDefaultQPushButton(tr("Configure"));
|
||||||
@ -84,18 +86,6 @@ void EnhancementsWidget::CreateWidgets()
|
|||||||
m_per_pixel_lighting =
|
m_per_pixel_lighting =
|
||||||
new GraphicsBool(tr("Per-Pixel Lighting"), Config::GFX_ENABLE_PIXEL_LIGHTING);
|
new GraphicsBool(tr("Per-Pixel Lighting"), Config::GFX_ENABLE_PIXEL_LIGHTING);
|
||||||
|
|
||||||
const std::array<const char*, 3> texture_filtering_modes = {{
|
|
||||||
QT_TR_NOOP("Default"),
|
|
||||||
QT_TR_NOOP("Force Nearest"),
|
|
||||||
QT_TR_NOOP("Force Linear"),
|
|
||||||
}};
|
|
||||||
for (size_t i = 0; i < texture_filtering_modes.size(); ++i)
|
|
||||||
{
|
|
||||||
m_force_texture_filtering[i] =
|
|
||||||
new GraphicsRadioInt(tr(texture_filtering_modes[i]),
|
|
||||||
Config::GFX_ENHANCE_FORCE_TEXTURE_FILTERING, static_cast<int>(i));
|
|
||||||
}
|
|
||||||
|
|
||||||
m_widescreen_hack = new GraphicsBool(tr("Widescreen Hack"), Config::GFX_WIDESCREEN_HACK);
|
m_widescreen_hack = new GraphicsBool(tr("Widescreen Hack"), Config::GFX_WIDESCREEN_HACK);
|
||||||
m_disable_fog = new GraphicsBool(tr("Disable Fog"), Config::GFX_DISABLE_FOG);
|
m_disable_fog = new GraphicsBool(tr("Disable Fog"), Config::GFX_DISABLE_FOG);
|
||||||
m_force_24bit_color =
|
m_force_24bit_color =
|
||||||
@ -119,10 +109,7 @@ void EnhancementsWidget::CreateWidgets()
|
|||||||
++row;
|
++row;
|
||||||
|
|
||||||
enhancements_layout->addWidget(new QLabel(tr("Texture Filtering:")), row, 0);
|
enhancements_layout->addWidget(new QLabel(tr("Texture Filtering:")), row, 0);
|
||||||
auto* force_filtering_box = new QHBoxLayout();
|
enhancements_layout->addWidget(m_texture_filtering_combo, row, 1, 1, -1);
|
||||||
for (size_t i = 0; i < texture_filtering_modes.size(); ++i)
|
|
||||||
force_filtering_box->addWidget(m_force_texture_filtering[i]);
|
|
||||||
enhancements_layout->addLayout(force_filtering_box, row, 1, 1, -1);
|
|
||||||
++row;
|
++row;
|
||||||
|
|
||||||
enhancements_layout->addWidget(new QLabel(tr("Post-Processing Effect:")), row, 0);
|
enhancements_layout->addWidget(new QLabel(tr("Post-Processing Effect:")), row, 0);
|
||||||
@ -413,6 +400,9 @@ void EnhancementsWidget::AddDescriptions()
|
|||||||
m_af_combo->SetTitle(tr("Anisotropic Filtering"));
|
m_af_combo->SetTitle(tr("Anisotropic Filtering"));
|
||||||
m_af_combo->SetDescription(tr(TR_ANISOTROPIC_FILTERING_DESCRIPTION));
|
m_af_combo->SetDescription(tr(TR_ANISOTROPIC_FILTERING_DESCRIPTION));
|
||||||
|
|
||||||
|
m_texture_filtering_combo->SetTitle(tr("Texture Filtering"));
|
||||||
|
m_texture_filtering_combo->SetDescription(tr(TR_FORCE_TEXTURE_FILTERING_DESCRIPTION));
|
||||||
|
|
||||||
m_pp_effect->SetTitle(tr("Post-Processing Effect"));
|
m_pp_effect->SetTitle(tr("Post-Processing Effect"));
|
||||||
m_pp_effect->SetDescription(tr(TR_POSTPROCESSING_DESCRIPTION));
|
m_pp_effect->SetDescription(tr(TR_POSTPROCESSING_DESCRIPTION));
|
||||||
|
|
||||||
@ -426,9 +416,6 @@ void EnhancementsWidget::AddDescriptions()
|
|||||||
|
|
||||||
m_force_24bit_color->SetDescription(tr(TR_FORCE_24BIT_DESCRIPTION));
|
m_force_24bit_color->SetDescription(tr(TR_FORCE_24BIT_DESCRIPTION));
|
||||||
|
|
||||||
for (size_t i = 0; i < m_force_texture_filtering.size(); ++i)
|
|
||||||
m_force_texture_filtering[i]->SetDescription(tr(TR_FORCE_TEXTURE_FILTERING_DESCRIPTION));
|
|
||||||
|
|
||||||
m_disable_copy_filter->SetDescription(tr(TR_DISABLE_COPY_FILTER_DESCRIPTION));
|
m_disable_copy_filter->SetDescription(tr(TR_DISABLE_COPY_FILTER_DESCRIPTION));
|
||||||
|
|
||||||
m_arbitrary_mipmap_detection->SetDescription(tr(TR_ARBITRARY_MIPMAP_DETECTION_DESCRIPTION));
|
m_arbitrary_mipmap_detection->SetDescription(tr(TR_ARBITRARY_MIPMAP_DETECTION_DESCRIPTION));
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
|
|
||||||
class GraphicsBool;
|
class GraphicsBool;
|
||||||
class GraphicsChoice;
|
class GraphicsChoice;
|
||||||
class GraphicsRadioInt;
|
|
||||||
class GraphicsSlider;
|
class GraphicsSlider;
|
||||||
class GraphicsWindow;
|
class GraphicsWindow;
|
||||||
class QCheckBox;
|
class QCheckBox;
|
||||||
@ -38,11 +37,11 @@ private:
|
|||||||
GraphicsChoice* m_ir_combo;
|
GraphicsChoice* m_ir_combo;
|
||||||
ToolTipComboBox* m_aa_combo;
|
ToolTipComboBox* m_aa_combo;
|
||||||
GraphicsChoice* m_af_combo;
|
GraphicsChoice* m_af_combo;
|
||||||
|
GraphicsChoice* m_texture_filtering_combo;
|
||||||
ToolTipComboBox* m_pp_effect;
|
ToolTipComboBox* m_pp_effect;
|
||||||
QPushButton* m_configure_pp_effect;
|
QPushButton* m_configure_pp_effect;
|
||||||
GraphicsBool* m_scaled_efb_copy;
|
GraphicsBool* m_scaled_efb_copy;
|
||||||
GraphicsBool* m_per_pixel_lighting;
|
GraphicsBool* m_per_pixel_lighting;
|
||||||
std::array<GraphicsRadioInt*, 3> m_force_texture_filtering;
|
|
||||||
GraphicsBool* m_widescreen_hack;
|
GraphicsBool* m_widescreen_hack;
|
||||||
GraphicsBool* m_disable_fog;
|
GraphicsBool* m_disable_fog;
|
||||||
GraphicsBool* m_force_24bit_color;
|
GraphicsBool* m_force_24bit_color;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user