Qt: Hide texture directory option per-game

This commit is contained in:
KamFretoZ 2024-06-09 21:14:58 +07:00 committed by Connor McLaughlin
parent 8a18403fea
commit 62c5309b23
3 changed files with 24 additions and 8 deletions

View File

@ -220,6 +220,18 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget*
onTextureDumpChanged();
onTextureReplacementChanged();
if (m_dialog->isPerGameSettings())
{
m_ui.textureReplacementLayout->removeWidget(m_ui.texturesDirectoryBox);
m_ui.texturesDirectoryBox->deleteLater();
m_ui.texturesDirectoryBox = nullptr;
m_ui.texturesDirectory = nullptr;
m_ui.texturesBrowse = nullptr;
m_ui.texturesOpen = nullptr;
m_ui.texturesReset = nullptr;
m_ui.textureDescriptionText = nullptr;
}
//////////////////////////////////////////////////////////////////////////
// Advanced Settings
//////////////////////////////////////////////////////////////////////////

View File

@ -1215,17 +1215,17 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="tab">
<widget class="QWidget" name="textureReplacementTab">
<attribute name="title">
<string>Texture Replacement</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_4">
<layout class="QVBoxLayout" name="textureReplacementLayout">
<item>
<widget class="QGroupBox" name="groupBox">
<widget class="QGroupBox" name="textureOptions">
<property name="title">
<string>Options</string>
</property>
<layout class="QGridLayout" name="gridLayout_8">
<layout class="QGridLayout" name="textureOptionLayout">
<item row="3" column="0">
<widget class="QCheckBox" name="precacheTextureReplacements">
<property name="text">
@ -1272,11 +1272,11 @@
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_6">
<widget class="QGroupBox" name="texturesDirectoryBox">
<property name="title">
<string>Search Directory</string>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<layout class="QGridLayout" name="textureDirectoryLayout">
<item row="1" column="0">
<widget class="QLineEdit" name="texturesDirectory"/>
</item>
@ -1302,7 +1302,7 @@
</widget>
</item>
<item row="0" column="0" colspan="4">
<widget class="QLabel" name="label_38">
<widget class="QLabel" name="textureDescriptionText">
<property name="text">
<string>PCSX2 will dump and load texture replacements from this directory.</string>
</property>

View File

@ -3845,7 +3845,11 @@ void FullscreenUI::DrawGraphicsSettingsPage(SettingsInterface* bsi, bool show_ad
DrawToggleSetting(bsi, FSUI_CSTR("Precache Replacements"),
FSUI_CSTR("Preloads all replacement textures to memory. Not necessary with asynchronous loading."), "EmuCore/GS",
"PrecacheTextureReplacements", false, replacement_active);
DrawFolderSetting(bsi, FSUI_CSTR("Replacements Directory"), FSUI_CSTR("Folders"), "Textures", EmuFolders::Textures);
if (!IsEditingGameSettings(bsi))
{
DrawFolderSetting(bsi, FSUI_CSTR("Replacements Directory"), FSUI_CSTR("Folders"), "Textures", EmuFolders::Textures);
}
MenuHeading(FSUI_CSTR("Texture Dumping"));
DrawToggleSetting(bsi, FSUI_CSTR("Dump Textures"), FSUI_CSTR("Dumps replaceable textures to disk. Will reduce performance."),