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(); onTextureDumpChanged();
onTextureReplacementChanged(); 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 // Advanced Settings
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////

View File

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

View File

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