mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-23 02:45:45 +00:00
configure_graphics_advance: Generate UI at runtime
We can iterate through the AdvancedGraphics settings and generate the UI during runtime. This doesn't help runtime efficiency, but it helps a ton in reducing the amount of work a developer needs in order to add a new setting.
This commit is contained in:
parent
f5d7aedfe9
commit
4a5f3e4733
15 changed files with 449 additions and 400 deletions
|
@ -11,6 +11,7 @@
|
|||
#include <QWidget>
|
||||
#include <qobjectdefs.h>
|
||||
#include "common/settings.h"
|
||||
#include "yuzu/configuration/shared_translation.h"
|
||||
|
||||
namespace ConfigurationShared {
|
||||
|
||||
|
@ -40,6 +41,11 @@ enum class CheckState {
|
|||
Count, // Simply the number of states, not a valid checkbox state
|
||||
};
|
||||
|
||||
QWidget* CreateWidget(Settings::BasicSetting* setting, const TranslationMap& translations,
|
||||
QWidget* parent, bool runtime_lock,
|
||||
std::forward_list<std::function<void(bool)>>& apply_funcs,
|
||||
std::list<CheckState>& trackers);
|
||||
|
||||
// Global-aware apply and set functions
|
||||
|
||||
// ApplyPerGameSetting, given a Settings::Setting and a Qt UI element, properly applies a Setting
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue