mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-04-29 23:41:12 -06:00
overlays: Add performance overlay window-space setting
This commit is contained in:
parent
2ba7756c0e
commit
716ff5a212
@ -256,6 +256,7 @@ namespace rsx
|
||||
add_unsigned_slider(&g_cfg.video.perf_overlay.margin_y, localized_string_id::HOME_MENU_SETTINGS_PERFORMANCE_OVERLAY_MARGIN_Y, " px", 1);
|
||||
add_unsigned_slider(&g_cfg.video.perf_overlay.font_size, localized_string_id::HOME_MENU_SETTINGS_PERFORMANCE_OVERLAY_FONT_SIZE, " px", 1);
|
||||
add_unsigned_slider(&g_cfg.video.perf_overlay.opacity, localized_string_id::HOME_MENU_SETTINGS_PERFORMANCE_OVERLAY_OPACITY, " %", 1);
|
||||
add_checkbox(&g_cfg.video.perf_overlay.perf_overlay_use_window_space, localized_string_id::HOME_MENU_SETTINGS_PERFORMANCE_OVERLAY_USE_WINDOW_SPACE);
|
||||
|
||||
apply_layout();
|
||||
}
|
||||
|
||||
@ -270,6 +270,7 @@ enum class localized_string_id
|
||||
HOME_MENU_SETTINGS_PERFORMANCE_OVERLAY_MARGIN_Y,
|
||||
HOME_MENU_SETTINGS_PERFORMANCE_OVERLAY_FONT_SIZE,
|
||||
HOME_MENU_SETTINGS_PERFORMANCE_OVERLAY_OPACITY,
|
||||
HOME_MENU_SETTINGS_PERFORMANCE_OVERLAY_USE_WINDOW_SPACE,
|
||||
HOME_MENU_SETTINGS_DEBUG,
|
||||
HOME_MENU_SETTINGS_DEBUG_OVERLAY,
|
||||
HOME_MENU_SETTINGS_DEBUG_INPUT_OVERLAY,
|
||||
|
||||
@ -209,8 +209,8 @@ struct cfg_root : cfg::node
|
||||
cfg::uint<4, 36> font_size{ this, "Font size (px)", 10, true };
|
||||
cfg::_enum<screen_quadrant> position{ this, "Position", screen_quadrant::top_left, true };
|
||||
cfg::string font{ this, "Font", "n023055ms.ttf", true };
|
||||
cfg::uint<0, 1280> margin_x{ this, "Horizontal Margin (px)", 50, true }; // horizontal distance to the screen border relative to the screen_quadrant in px
|
||||
cfg::uint<0, 720> margin_y{ this, "Vertical Margin (px)", 50, true }; // vertical distance to the screen border relative to the screen_quadrant in px
|
||||
cfg::uint<0, 65535> margin_x{ this, "Horizontal Margin (px)", 50, true }; // horizontal distance to the window border relative to the screen_quadrant in px
|
||||
cfg::uint<0, 65535> margin_y{ this, "Vertical Margin (px)", 50, true }; // vertical distance to the window border relative to the screen_quadrant in px
|
||||
cfg::_bool center_x{ this, "Center Horizontally", false, true };
|
||||
cfg::_bool center_y{ this, "Center Vertically", false, true };
|
||||
cfg::uint<0, 100> opacity{ this, "Opacity (%)", 70, true };
|
||||
@ -218,6 +218,7 @@ struct cfg_root : cfg::node
|
||||
cfg::string background_body{ this, "Body Background (hex)", "#002339FF", true };
|
||||
cfg::string color_title{ this, "Title Color (hex)", "#F26C24FF", true };
|
||||
cfg::string background_title{ this, "Title Background (hex)", "#00000000", true };
|
||||
cfg::_bool perf_overlay_use_window_space{this, "Performance Overlay Use Window Space", false, true};
|
||||
|
||||
} perf_overlay{ this };
|
||||
|
||||
|
||||
@ -127,6 +127,7 @@ enum class emu_settings_type
|
||||
PerfOverlayMarginY,
|
||||
PerfOverlayCenterX,
|
||||
PerfOverlayCenterY,
|
||||
PerfOverlayUseWindowSpace,
|
||||
|
||||
// Shader Loading Dialog
|
||||
ShaderLoadBgEnabled,
|
||||
@ -342,6 +343,7 @@ inline static const std::map<emu_settings_type, cfg_location> settings_location
|
||||
{ emu_settings_type::PerfOverlayMarginY, { "Video", "Performance Overlay", "Vertical Margin (px)" } },
|
||||
{ emu_settings_type::PerfOverlayCenterX, { "Video", "Performance Overlay", "Center Horizontally" } },
|
||||
{ emu_settings_type::PerfOverlayCenterY, { "Video", "Performance Overlay", "Center Vertically" } },
|
||||
{ emu_settings_type::PerfOverlayUseWindowSpace, { "Video", "Performance Overlay", "Performance Overlay Use Window Space"}},
|
||||
|
||||
// Shader Loading Dialog
|
||||
{ emu_settings_type::ShaderLoadBgEnabled, { "Video", "Shader Loading Dialog", "Allow custom background" } },
|
||||
|
||||
@ -290,6 +290,7 @@ private:
|
||||
case localized_string_id::HOME_MENU_SETTINGS_PERFORMANCE_OVERLAY_MARGIN_Y: return tr("Vertical Margin", "Performance Overlay");
|
||||
case localized_string_id::HOME_MENU_SETTINGS_PERFORMANCE_OVERLAY_FONT_SIZE: return tr("Font Size", "Performance Overlay");
|
||||
case localized_string_id::HOME_MENU_SETTINGS_PERFORMANCE_OVERLAY_OPACITY: return tr("Opacity", "Performance Overlay");
|
||||
case localized_string_id::HOME_MENU_SETTINGS_PERFORMANCE_OVERLAY_USE_WINDOW_SPACE: return tr("Use Window Space", "Performance Overlay");
|
||||
case localized_string_id::HOME_MENU_SETTINGS_DEBUG: return tr("Debug");
|
||||
case localized_string_id::HOME_MENU_SETTINGS_DEBUG_OVERLAY: return tr("Debug Overlay", "Debug");
|
||||
case localized_string_id::HOME_MENU_SETTINGS_DEBUG_INPUT_OVERLAY: return tr("Input Debug Overlay", "Debug");
|
||||
|
||||
@ -1875,6 +1875,9 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> gui_settings, std
|
||||
});
|
||||
ui->perfOverlayMarginY->setEnabled(!ui->perfOverlayCenterY->isChecked());
|
||||
|
||||
m_emu_settings->EnhanceCheckBox(ui->perfOverlayUseWindowSpace, emu_settings_type::PerfOverlayUseWindowSpace);
|
||||
SubscribeTooltip(ui->perfOverlayUseWindowSpace, tooltips.settings.perf_overlay_use_window_space);
|
||||
|
||||
m_emu_settings->EnhanceCheckBox(ui->perfOverlayFramerateGraphEnabled, emu_settings_type::PerfOverlayFramerateGraphEnabled);
|
||||
SubscribeTooltip(ui->perfOverlayFramerateGraphEnabled, tooltips.settings.perf_overlay_framerate_graph_enabled);
|
||||
|
||||
@ -1901,6 +1904,7 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> gui_settings, std
|
||||
ui->perfOverlayMarginY->setEnabled(enabled && !ui->perfOverlayCenterY->isChecked());
|
||||
ui->perfOverlayCenterX->setEnabled(enabled);
|
||||
ui->perfOverlayCenterY->setEnabled(enabled);
|
||||
ui->perfOverlayUseWindowSpace->setEnabled(enabled);
|
||||
ui->perfOverlayFramerateGraphEnabled->setEnabled(enabled);
|
||||
ui->perfOverlayFrametimeGraphEnabled->setEnabled(enabled);
|
||||
ui->perf_overlay_framerate_datapoints->setEnabled(enabled);
|
||||
|
||||
@ -3549,6 +3549,13 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="perfOverlayUseWindowSpace">
|
||||
<property name="text">
|
||||
<string>Use Window Space</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="perf_overlay_update_interval" native="true">
|
||||
<layout class="QVBoxLayout" name="layout_perf_overlay_update_interval">
|
||||
|
||||
@ -173,6 +173,7 @@ public:
|
||||
const QString perf_overlay_margin_y = tr("Sets the vertical distance to the screen border relative to the screen quadrant (measured in pixels).");
|
||||
const QString perf_overlay_center_x = tr("Centers the performance overlay horizontally and overrides the horizontal margin.");
|
||||
const QString perf_overlay_center_y = tr("Centers the performance overlay vertically and overrides the vertical margin.");
|
||||
const QString perf_overlay_use_window_space = tr("Position overlay relative to the full window surface, enabling placement outside game's framebuffer area.");
|
||||
|
||||
const QString shader_load_bg_enabled = tr("Shows a background image during the native shader loading dialog/loading screen.\nBy default the used image will be <gamedir>/PS3_GAME/PIC1.PNG.");
|
||||
const QString shader_load_bg_darkening = tr("Changes the background image darkening effect strength of the native shader loading dialog.\nThis may be used to improve readability and/or aesthetics.");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user