mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-01-18 06:25:37 +00:00
Qt: Add help for general settings
This commit is contained in:
parent
4629cdfffc
commit
e662f34f8b
|
@ -1,9 +1,8 @@
|
||||||
#include "generalsettingswidget.h"
|
#include "generalsettingswidget.h"
|
||||||
|
#include "settingsdialog.h"
|
||||||
#include "settingwidgetbinder.h"
|
#include "settingwidgetbinder.h"
|
||||||
|
|
||||||
static constexpr char BIOS_IMAGE_FILTER[] = "Binary Images (*.bin);;All Files (*.*)";
|
GeneralSettingsWidget::GeneralSettingsWidget(QtHostInterface* host_interface, QWidget* parent, SettingsDialog* dialog)
|
||||||
|
|
||||||
GeneralSettingsWidget::GeneralSettingsWidget(QtHostInterface* host_interface, QWidget* parent /* = nullptr */)
|
|
||||||
: QWidget(parent), m_host_interface(host_interface)
|
: QWidget(parent), m_host_interface(host_interface)
|
||||||
{
|
{
|
||||||
m_ui.setupUi(this);
|
m_ui.setupUi(this);
|
||||||
|
@ -29,6 +28,37 @@ GeneralSettingsWidget::GeneralSettingsWidget(QtHostInterface* host_interface, QW
|
||||||
|
|
||||||
onEnableSpeedLimiterStateChanged();
|
onEnableSpeedLimiterStateChanged();
|
||||||
onEmulationSpeedValueChanged(m_ui.emulationSpeed->value());
|
onEmulationSpeedValueChanged(m_ui.emulationSpeed->value());
|
||||||
|
|
||||||
|
dialog->registerWidgetHelp(m_ui.pauseOnStart, "Pause On Start", "Unchecked",
|
||||||
|
"Pauses the emulator when a game is started.");
|
||||||
|
dialog->registerWidgetHelp(m_ui.startFullscreen, "Start Fullscreen", "Unchecked",
|
||||||
|
"Automatically switches to fullscreen mode when a game is started.");
|
||||||
|
dialog->registerWidgetHelp(m_ui.saveStateOnExit, "Save State On Exit", "Checked",
|
||||||
|
"Automatically saves the emulator state when powering down or exiting. You can then "
|
||||||
|
"resume directly from where you left off next time.");
|
||||||
|
dialog->registerWidgetHelp(m_ui.confirmPowerOff, "Confirm Power Off", "Checked",
|
||||||
|
"Determines whether a prompt will be displayed to confirm shutting down the emulator/game "
|
||||||
|
"when the hotkey is pressed.");
|
||||||
|
dialog->registerWidgetHelp(m_ui.enableSpeedLimiter, "Enable Speed Limiter", "Checked",
|
||||||
|
"Throttles the emulation speed to the chosen speed above. If unchecked, the emulator will "
|
||||||
|
"run as fast as possible, which may not be playable.");
|
||||||
|
dialog->registerWidgetHelp(m_ui.increaseTimerResolution, "Increase Timer Resolution", "Checked",
|
||||||
|
"Increases the system timer resolution when emulation is started to provide more accurate "
|
||||||
|
"frame pacing. May increase battery usage on laptops.");
|
||||||
|
dialog->registerWidgetHelp(m_ui.emulationSpeed, "Emulation Speed", "100%",
|
||||||
|
"Sets the target emulation speed. It is not guaranteed that this speed will be reached, "
|
||||||
|
"and if not, the emulator will run as fast as it can manage.");
|
||||||
|
dialog->registerWidgetHelp(m_ui.showOSDMessages, "Show OSD Messages", "Checked",
|
||||||
|
"Shows on-screen-display messages when events occur such as save states being "
|
||||||
|
"created/loaded, screenshots being taken, etc.");
|
||||||
|
dialog->registerWidgetHelp(m_ui.showFPS, "Show FPS", "Unchecked",
|
||||||
|
"Shows the internal frame rate of the game in the top-right corner of the display.");
|
||||||
|
dialog->registerWidgetHelp(m_ui.showVPS, "Show VPS", "Unchecked",
|
||||||
|
"Shows the number of frames (or v-syncs) displayed per second by the system in the "
|
||||||
|
"top-right corner of the display.");
|
||||||
|
dialog->registerWidgetHelp(
|
||||||
|
m_ui.showSpeed, "Show Speed", "Unchecked",
|
||||||
|
"Shows the current emulation speed of the system in the top-right corner of the display as a percentage.");
|
||||||
}
|
}
|
||||||
|
|
||||||
GeneralSettingsWidget::~GeneralSettingsWidget() = default;
|
GeneralSettingsWidget::~GeneralSettingsWidget() = default;
|
||||||
|
|
|
@ -5,13 +5,14 @@
|
||||||
#include "ui_generalsettingswidget.h"
|
#include "ui_generalsettingswidget.h"
|
||||||
|
|
||||||
class QtHostInterface;
|
class QtHostInterface;
|
||||||
|
class SettingsDialog;
|
||||||
|
|
||||||
class GeneralSettingsWidget : public QWidget
|
class GeneralSettingsWidget : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit GeneralSettingsWidget(QtHostInterface* host_interface, QWidget* parent = nullptr);
|
explicit GeneralSettingsWidget(QtHostInterface* host_interface, QWidget* parent, SettingsDialog* dialog);
|
||||||
~GeneralSettingsWidget();
|
~GeneralSettingsWidget();
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
|
|
|
@ -16,7 +16,7 @@ SettingsDialog::SettingsDialog(QtHostInterface* host_interface, QWidget* parent
|
||||||
{
|
{
|
||||||
m_ui.setupUi(this);
|
m_ui.setupUi(this);
|
||||||
|
|
||||||
m_general_settings = new GeneralSettingsWidget(host_interface, m_ui.settingsContainer);
|
m_general_settings = new GeneralSettingsWidget(host_interface, m_ui.settingsContainer, this);
|
||||||
m_console_settings = new ConsoleSettingsWidget(host_interface, m_ui.settingsContainer);
|
m_console_settings = new ConsoleSettingsWidget(host_interface, m_ui.settingsContainer);
|
||||||
m_game_list_settings = new GameListSettingsWidget(host_interface, m_ui.settingsContainer);
|
m_game_list_settings = new GameListSettingsWidget(host_interface, m_ui.settingsContainer);
|
||||||
m_hotkey_settings = new HotkeySettingsWidget(host_interface, m_ui.settingsContainer);
|
m_hotkey_settings = new HotkeySettingsWidget(host_interface, m_ui.settingsContainer);
|
||||||
|
|
Loading…
Reference in a new issue