mirror of https://github.com/PCSX2/pcsx2.git
Qt: Split texture replacement settings to its own page
This commit is contained in:
parent
3e585c3438
commit
1f5d2c49fc
|
@ -86,6 +86,12 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsDialog* dialog, QWidget*
|
|||
|
||||
m_ui.setupUi(this);
|
||||
|
||||
// start hidden, fixup in updateRendererDependentOptions()
|
||||
m_ui.hardwareRendererGroup->setVisible(false);
|
||||
m_ui.verticalLayout->removeWidget(m_ui.hardwareRendererGroup);
|
||||
m_ui.softwareRendererGroup->setVisible(false);
|
||||
m_ui.verticalLayout->removeWidget(m_ui.softwareRendererGroup);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Global Settings
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
@ -209,6 +215,8 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsDialog* dialog, QWidget*
|
|||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.loadTextureReplacements, "EmuCore/GS", "LoadTextureReplacements", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.loadTextureReplacementsAsync, "EmuCore/GS", "LoadTextureReplacementsAsync", true);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.precacheTextureReplacements, "EmuCore/GS", "PrecacheTextureReplacements", false);
|
||||
SettingWidgetBinder::BindWidgetToFolderSetting(sif, m_ui.texturesDirectory, m_ui.texturesBrowse, m_ui.texturesOpen, m_ui.texturesReset,
|
||||
"Folders", "Textures", "textures");
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Advanced Settings
|
||||
|
@ -538,7 +546,7 @@ void GraphicsSettingsWidget::updateRendererDependentOptions()
|
|||
const int current_tab = m_hardware_renderer_visible ? m_ui.hardwareRendererGroup->currentIndex() : m_ui.softwareRendererGroup->currentIndex();
|
||||
|
||||
// move advanced tab to the correct parent
|
||||
static constexpr std::array<const char*, 3> move_tab_names = {{"Display", "On-Screen Display", "Advanced"}};
|
||||
static constexpr std::array<const char*, 3> move_tab_names = {{"Display", "OSD", "Advanced"}};
|
||||
const std::array<QWidget*, 3> move_tab_pointers = {{m_ui.gameDisplayTab, m_ui.osdTab, m_ui.advancedTab}};
|
||||
for (size_t i = 0; i < move_tab_pointers.size(); i++)
|
||||
{
|
||||
|
@ -565,7 +573,7 @@ void GraphicsSettingsWidget::updateRendererDependentOptions()
|
|||
{
|
||||
// map first two tabs over, skip hacks
|
||||
m_ui.verticalLayout->insertWidget(1, m_ui.hardwareRendererGroup);
|
||||
m_ui.hardwareRendererGroup->setCurrentIndex((current_tab < 2) ? current_tab : (current_tab + 2));
|
||||
m_ui.hardwareRendererGroup->setCurrentIndex((current_tab < 2) ? current_tab : (current_tab + 3));
|
||||
}
|
||||
|
||||
m_hardware_renderer_visible = is_hardware;
|
||||
|
@ -685,5 +693,6 @@ void GraphicsSettingsWidget::updateRendererDependentOptions()
|
|||
}
|
||||
|
||||
m_ui.enableHWFixes->setEnabled(is_hardware);
|
||||
onEnableHardwareFixesChanged();
|
||||
if (is_hardware)
|
||||
onEnableHardwareFixesChanged();
|
||||
}
|
||||
|
|
|
@ -31,8 +31,6 @@ public:
|
|||
GraphicsSettingsWidget(SettingsDialog* dialog, QWidget* parent);
|
||||
~GraphicsSettingsWidget();
|
||||
|
||||
void updateRendererDependentOptions();
|
||||
|
||||
Q_SIGNALS:
|
||||
void fullscreenModesChanged(const QStringList& modes);
|
||||
|
||||
|
@ -48,11 +46,12 @@ private Q_SLOTS:
|
|||
|
||||
private:
|
||||
GSRendererType getEffectiveRenderer() const;
|
||||
void updateRendererDependentOptions();
|
||||
|
||||
SettingsDialog* m_dialog;
|
||||
|
||||
Ui::GraphicsSettingsWidget m_ui;
|
||||
|
||||
bool m_hardware_renderer_visible = true;
|
||||
bool m_software_renderer_visible = true;
|
||||
bool m_hardware_renderer_visible = false;
|
||||
bool m_software_renderer_visible = false;
|
||||
};
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>566</width>
|
||||
<width>657</width>
|
||||
<height>890</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -913,9 +913,120 @@
|
|||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
<string>Texture Replacement</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_6">
|
||||
<property name="title">
|
||||
<string>Search Directory</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLineEdit" name="texturesDirectory"/>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="texturesBrowse">
|
||||
<property name="text">
|
||||
<string>Browse...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="texturesOpen">
|
||||
<property name="text">
|
||||
<string>Open...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QPushButton" name="texturesReset">
|
||||
<property name="text">
|
||||
<string>Reset</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="4">
|
||||
<widget class="QLabel" name="label_38">
|
||||
<property name="text">
|
||||
<string>PCSX2 will dump and load texture replacements from this directory.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Options</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_8">
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="dumpReplaceableTextures">
|
||||
<property name="text">
|
||||
<string>Dump Textures</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="dumpReplaceableMipmaps">
|
||||
<property name="text">
|
||||
<string>Dump Mipmaps</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="dumpTexturesWithFMVActive">
|
||||
<property name="text">
|
||||
<string>Dump FMV Textures</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="loadTextureReplacementsAsync">
|
||||
<property name="text">
|
||||
<string>Async Texture Loading</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="loadTextureReplacements">
|
||||
<property name="text">
|
||||
<string>Load Textures</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="precacheTextureReplacements">
|
||||
<property name="text">
|
||||
<string>Precache Textures</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="osdTab">
|
||||
<attribute name="title">
|
||||
<string>On-Screen Display</string>
|
||||
<string>OSD</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
|
@ -1287,57 +1398,6 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Texture Replacement</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_8">
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="dumpReplaceableTextures">
|
||||
<property name="text">
|
||||
<string>Dump Textures</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="dumpReplaceableMipmaps">
|
||||
<property name="text">
|
||||
<string>Dump Mipmaps</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="loadTextureReplacementsAsync">
|
||||
<property name="text">
|
||||
<string>Async Texture Loading</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="precacheTextureReplacements">
|
||||
<property name="text">
|
||||
<string>Precache Textures</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="loadTextureReplacements">
|
||||
<property name="text">
|
||||
<string>Load Textures</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="dumpTexturesWithFMVActive">
|
||||
<property name="text">
|
||||
<string>Dump FMV Textures</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
|
|
Loading…
Reference in New Issue