From 392a4bdc0bd2e191189e8f18c78db76a35c1a0e5 Mon Sep 17 00:00:00 2001 From: VelocityRa Date: Sun, 10 Jun 2018 20:25:28 +0300 Subject: [PATCH] Qt: Add perf overlay position to settings dialog --- rpcs3/Json/tooltips.json | 1 + rpcs3/rpcs3qt/emu_settings.h | 2 ++ rpcs3/rpcs3qt/settings_dialog.cpp | 4 ++++ rpcs3/rpcs3qt/settings_dialog.ui | 10 ++++++++++ 4 files changed, 17 insertions(+) diff --git a/rpcs3/Json/tooltips.json b/rpcs3/Json/tooltips.json index 49f6d28ea5..9bcf8c3fcf 100644 --- a/rpcs3/Json/tooltips.json +++ b/rpcs3/Json/tooltips.json @@ -67,6 +67,7 @@ }, "overlay": { "perfOverlayEnabled": "Enables or disables the performance overlay.", + "perfOverlayPosition": "Sets the on-screen position (quadrant) of the perfomance overlay.", "perfOverlayDetailLevel": "Controls the amount of information displayed on the performance overlay.", "perfOverlayUpdateInterval": "Sets the time interval in which the performance overlay is being updated (measured in milliseconds).", "perfOverlayFontSize": "Sets the font size of the performance overlay (measured in pixels)." diff --git a/rpcs3/rpcs3qt/emu_settings.h b/rpcs3/rpcs3qt/emu_settings.h index 594452899d..3bb60f4a0b 100644 --- a/rpcs3/rpcs3qt/emu_settings.h +++ b/rpcs3/rpcs3qt/emu_settings.h @@ -72,6 +72,7 @@ public: // Performance Overlay PerfOverlayEnabled, PerfOverlayDetailLevel, + PerfOverlayPosition, PerfOverlayUpdateInterval, PerfOverlayFontSize, @@ -241,6 +242,7 @@ private: // Performance Overlay { PerfOverlayEnabled, { "Video", "Performance Overlay", "Enabled" } }, { PerfOverlayDetailLevel, { "Video", "Performance Overlay", "Detail level" } }, + { PerfOverlayPosition, { "Video", "Performance Overlay", "Position" } }, { PerfOverlayUpdateInterval,{ "Video", "Performance Overlay", "Metrics update interval (ms)" } }, { PerfOverlayFontSize, { "Video", "Performance Overlay", "Font size (px)" } }, diff --git a/rpcs3/rpcs3qt/settings_dialog.cpp b/rpcs3/rpcs3qt/settings_dialog.cpp index be5d4876b4..1a1e2e5df0 100644 --- a/rpcs3/rpcs3qt/settings_dialog.cpp +++ b/rpcs3/rpcs3qt/settings_dialog.cpp @@ -742,6 +742,9 @@ settings_dialog::settings_dialog(std::shared_ptr guiSettings, std: xemu_settings->EnhanceComboBox(ui->perfOverlayDetailLevel, emu_settings::PerfOverlayDetailLevel); SubscribeTooltip(ui->perfOverlayDetailLevel, json_emu_overlay["perfOverlayDetailLevel"].toString()); + xemu_settings->EnhanceComboBox(ui->perfOverlayPosition, emu_settings::PerfOverlayPosition); + SubscribeTooltip(ui->perfOverlayPosition, json_emu_overlay["perfOverlayPosition"].toString()); + // Checkboxes SubscribeTooltip(ui->gs_resizeOnBoot, json_emu_misc["gs_resizeOnBoot"].toString()); @@ -777,6 +780,7 @@ settings_dialog::settings_dialog(std::shared_ptr guiSettings, std: ui->label_update_interval->setEnabled(enabled); ui->label_font_size->setEnabled(enabled); ui->perfOverlayDetailLevel->setEnabled(enabled); + ui->perfOverlayPosition->setEnabled(enabled); ui->perfOverlayUpdateInterval->setEnabled(enabled); ui->perfOverlayFontSize->setEnabled(enabled); }; diff --git a/rpcs3/rpcs3qt/settings_dialog.ui b/rpcs3/rpcs3qt/settings_dialog.ui index 106e73904b..b969e0a60a 100644 --- a/rpcs3/rpcs3qt/settings_dialog.ui +++ b/rpcs3/rpcs3qt/settings_dialog.ui @@ -1447,6 +1447,16 @@ + + + + Position: + + + + + +