Add GFX property tabs to game properties window, allowing them to be set to the user game ini. Additionally, refactor ConfigWidgets to reduce duplication. Refactor GameConfigWidget to use config system.

Creates a layer outside the game config layer system and passes it to the created gfx widows, so as to not interfere with the global config system.

Supports multiple game properties being open at once.
Supports editing while a game is playing, but the options only save and update the active game when the window is closed.
Right-clicking will remove a property from the game ini.
This commit is contained in:
TryTwo
2024-09-17 23:29:13 -07:00
parent 08df9a66e0
commit 84a937ae65
24 changed files with 573 additions and 464 deletions

View File

@ -8,22 +8,22 @@
class ConfigBool;
class ConfigChoice;
class ConfigInteger;
class GameConfigWidget;
class GraphicsWindow;
class QCheckBox;
class QComboBox;
class QSpinBox;
class ToolTipCheckBox;
namespace Config
{
class Layer;
} // namespace Config
class AdvancedWidget final : public QWidget
{
Q_OBJECT
public:
explicit AdvancedWidget(GraphicsWindow* parent);
AdvancedWidget(GameConfigWidget* parent, Config::Layer* layer);
private:
void LoadSettings();
void SaveSettings();
void CreateWidgets();
void ConnectWidgets();
void AddDescriptions();
@ -52,7 +52,7 @@ private:
ConfigBool* m_dump_xfb_target;
ConfigBool* m_disable_vram_copies;
ConfigBool* m_load_custom_textures;
ToolTipCheckBox* m_enable_graphics_mods;
ConfigBool* m_enable_graphics_mods;
// Texture dumping
ConfigBool* m_dump_textures;
@ -67,7 +67,7 @@ private:
// Misc
ConfigBool* m_enable_cropping;
ToolTipCheckBox* m_enable_prog_scan;
ConfigBool* m_enable_prog_scan;
ConfigBool* m_backend_multithreading;
ConfigBool* m_prefer_vs_for_point_line_expansion;
ConfigBool* m_cpu_cull;
@ -76,4 +76,6 @@ private:
// Experimental
ConfigBool* m_defer_efb_access_invalidation;
ConfigBool* m_manual_texture_sampling;
Config::Layer* m_game_layer = nullptr;
};