settings: File selector & other settings

First of all, TASing requires a script to play back. The user can select the parent directory at `System -> Filesystem`, next to an option to pause TAS during loads: This requires a "hacky" setup deeper in the code and will be added in the last commit.

Also, Hotkeys are being introduced: CTRL+F5 for playback start/stop, CTRL+F6 for re-reading the script and CTRL+F7 for recording a new script.
This commit is contained in:
MonsterDruide1
2021-06-18 16:20:10 +02:00
parent b42c3ce21d
commit f25d6ebc45
9 changed files with 104 additions and 2 deletions

View File

@ -1015,6 +1015,19 @@ void GMainWindow::InitializeHotkeys() {
render_window->setAttribute(Qt::WA_Hover, true);
}
});
connect(hotkey_registry.GetHotkey(main_window, QStringLiteral("TAS Start/Stop"), this),
&QShortcut::activated, this, [&] {
Settings::values.tas_enable = !Settings::values.tas_enable;
LOG_INFO(Frontend, "Tas enabled {}", Settings::values.tas_enable);
});
connect(hotkey_registry.GetHotkey(main_window, QStringLiteral("TAS Reset"), this),
&QShortcut::activated, this, [&] { Settings::values.tas_reset = true; });
connect(hotkey_registry.GetHotkey(main_window, QStringLiteral("TAS Record"), this),
&QShortcut::activated, this, [&] {
Settings::values.tas_record = !Settings::values.tas_record;
LOG_INFO(Frontend, "Tas recording {}", Settings::values.tas_record);
});
}
void GMainWindow::SetDefaultUIGeometry() {