diff --git a/rpcs3/Json/tooltips.json b/rpcs3/Json/tooltips.json index bee0008dc9..c3631deae7 100644 --- a/rpcs3/Json/tooltips.json +++ b/rpcs3/Json/tooltips.json @@ -52,13 +52,6 @@ "disableFIFOReordering": "Disables RSX FIFO optimizations completely. Draws are processed as they are received by the DMA puller." }, "emulator": { - "gui": { - "configs": "Only useful to developers.\nIf unsure, don't use this option.", - "stylesheets": "Changes the overall look of RPCS3.\nChoose a stylesheet and click Apply to change between styles.", - "show_welcome": "Shows the initial welcome screen upon starting RPCS3.", - "useRichPresence": "Enables use of Discord Rich Presence to show what game you are playing on Discord.\nRequires a restart of RPCS3 to apply.", - "custom_colors": "Prioritize custom user interface colors over properties set in stylesheet." - }, "misc": { "exitOnStop": "Automatically close RPCS3 when closing a game, or when a game closes itself.", "alwaysStart": "Leave this enabled unless you are a developer.", @@ -96,6 +89,13 @@ "stretchToDisplayArea": "Overrides the aspect ratio and stretches the image to the full display area." } }, + "gui": { + "configs": "Only useful to developers.\nIf unsure, don't use this option.", + "stylesheets": "Changes the overall look of RPCS3.\nChoose a stylesheet and click Apply to change between styles.", + "show_welcome": "Shows the initial welcome screen upon starting RPCS3.", + "useRichPresence": "Enables use of Discord Rich Presence to show what game you are playing on Discord.\nRequires a restart of RPCS3 to apply.", + "custom_colors": "Prioritize custom user interface colors over properties set in stylesheet." + }, "input": { "padHandlerBox": "If you want to use the keyboard to control, select the Keyboard option.\nIf you have a DualShock 4, select DualShock 4.\nIf you have an Xbox controller, or another compatible device, use XInput.\nOlder controllers such as PS2 controllers with an adapter usually work fine with MMJoystick.\nCheck button mappings in the Windows control panel.", "padHandlerBox_Linux": "If you want to use the keyboard to control, select the Keyboard option.\nIf you have a DualShock 4, select DualShock 4.\nevdev input is WIP.", diff --git a/rpcs3/rpcs3qt/settings_dialog.cpp b/rpcs3/rpcs3qt/settings_dialog.cpp index 6be86737a3..7ea8b7169f 100644 --- a/rpcs3/rpcs3qt/settings_dialog.cpp +++ b/rpcs3/rpcs3qt/settings_dialog.cpp @@ -38,6 +38,10 @@ settings_dialog::settings_dialog(std::shared_ptr guiSettings, std: bool showDebugTab = xgui_settings->GetValue(gui::m_showDebugTab).toBool(); xgui_settings->SetValue(gui::m_showDebugTab, showDebugTab); if (!showDebugTab) + { + ui->tab_widget_settings->removeTab(8); + } + if (game) { ui->tab_widget_settings->removeTab(7); } @@ -50,6 +54,7 @@ settings_dialog::settings_dialog(std::shared_ptr guiSettings, std: SubscribeDescription(ui->description_system); SubscribeDescription(ui->description_network); SubscribeDescription(ui->description_emulator); + SubscribeDescription(ui->description_gui); SubscribeDescription(ui->description_debug); // read tooltips from json @@ -76,9 +81,10 @@ settings_dialog::settings_dialog(std::shared_ptr guiSettings, std: QJsonObject json_net = json_obj.value("network").toObject(); QJsonObject json_emu = json_obj.value("emulator").toObject(); - QJsonObject json_emu_gui = json_emu.value("gui").toObject(); QJsonObject json_emu_misc = json_emu.value("misc").toObject(); + QJsonObject json_gui = json_obj.value("gui").toObject(); + QJsonObject json_debug = json_obj.value("debug").toObject(); if (game) @@ -693,22 +699,12 @@ settings_dialog::settings_dialog(std::shared_ptr guiSettings, std: SubscribeTooltip(ui->maxLLVMThreads, json_emu_misc["maxLLVMThreads"].toString()); ui->maxLLVMThreads->setItemText(ui->maxLLVMThreads->findData("0"), tr("All (%1)").arg(std::thread::hardware_concurrency())); - SubscribeTooltip(ui->combo_configs, json_emu_gui["configs"].toString()); - - SubscribeTooltip(ui->combo_stylesheets, json_emu_gui["stylesheets"].toString()); - // Checkboxes SubscribeTooltip(ui->gs_resizeOnBoot, json_emu_misc["gs_resizeOnBoot"].toString()); SubscribeTooltip(ui->gs_disableMouse, json_emu_misc["gs_disableMouse"].toString()); - SubscribeTooltip(ui->cb_show_welcome, json_emu_gui["show_welcome"].toString()); - - SubscribeTooltip(ui->cb_custom_colors, json_emu_gui["custom_colors"].toString()); - - SubscribeTooltip(ui->useRichPresence, json_emu_gui["useRichPresence"].toString()); - xemu_settings->EnhanceCheckBox(ui->exitOnStop, emu_settings::ExitRPCS3OnFinish); SubscribeTooltip(ui->exitOnStop, json_emu_misc["exitOnStop"].toString()); @@ -730,14 +726,71 @@ settings_dialog::settings_dialog(std::shared_ptr guiSettings, std: xemu_settings->EnhanceCheckBox(ui->showShaderCompilationHint, emu_settings::ShowShaderCompilationHint); SubscribeTooltip(ui->showShaderCompilationHint, json_emu_misc["showShaderCompilationHint"].toString()); - if (game) + if (!game) { - ui->gb_stylesheets->setEnabled(false); - ui->gb_settings->setEnabled(false); - ui->gb_colors->setEnabled(false); - ui->gb_viewport->setEnabled(false); + ui->gs_disableMouse->setChecked(xgui_settings->GetValue(gui::gs_disableMouse).toBool()); + connect(ui->gs_disableMouse, &QCheckBox::clicked, [=](bool val) + { + xgui_settings->SetValue(gui::gs_disableMouse, val); + }); + + bool enableButtons = xgui_settings->GetValue(gui::gs_resize).toBool(); + ui->gs_resizeOnBoot->setChecked(enableButtons); + ui->gs_width->setEnabled(enableButtons); + ui->gs_height->setEnabled(enableButtons); + + QRect screen = QApplication::desktop()->screenGeometry(); + int width = xgui_settings->GetValue(gui::gs_width).toInt(); + int height = xgui_settings->GetValue(gui::gs_height).toInt(); + ui->gs_width->setValue(std::min(width, screen.width())); + ui->gs_height->setValue(std::min(height, screen.height())); + + connect(ui->gs_resizeOnBoot, &QCheckBox::clicked, [=](bool val) + { + xgui_settings->SetValue(gui::gs_resize, val); + ui->gs_width->setEnabled(val); + ui->gs_height->setEnabled(val); + }); + connect(ui->gs_width, &QSpinBox::editingFinished, [=]() + { + ui->gs_width->setValue(std::min(ui->gs_width->value(), QApplication::desktop()->screenGeometry().width())); + xgui_settings->SetValue(gui::gs_width, ui->gs_width->value()); + }); + connect(ui->gs_height, &QSpinBox::editingFinished, [=]() + { + ui->gs_height->setValue(std::min(ui->gs_height->value(), QApplication::desktop()->screenGeometry().height())); + xgui_settings->SetValue(gui::gs_height, ui->gs_height->value()); + }); + + ui->useRichPresence->setChecked(xgui_settings->GetValue(gui::m_richPresence).toBool()); + + connect(ui->useRichPresence, &QCheckBox::clicked, [=](bool val) + { + xgui_settings->SetValue(gui::m_richPresence, val); + }); } - else + + // _____ _ _ _ _______ _ + // / ____|| | | || | |__ __| | | + // | | __|| | | || | | | __ _| |__ + // | | |_ || | | || | | |/ _` | '_ \ + // | |__| || |__| || | | | (_| | |_) | + // \_____| \____/ |_| |_|\__,_|_.__/ + + // Comboboxes + SubscribeTooltip(ui->combo_configs, json_gui["configs"].toString()); + + SubscribeTooltip(ui->combo_stylesheets, json_gui["stylesheets"].toString()); + + // Checkboxes: + SubscribeTooltip(ui->cb_custom_colors, json_gui["custom_colors"].toString()); + + // Checkboxes: gui options + SubscribeTooltip(ui->cb_show_welcome, json_gui["show_welcome"].toString()); + + SubscribeTooltip(ui->useRichPresence, json_gui["useRichPresence"].toString()); + + if (!game) { // colorize preview icons auto addColoredIcon = [&](QPushButton *button, const QColor& color, const QIcon& icon = QIcon(), const QColor& iconColor = QColor()) @@ -876,47 +929,6 @@ settings_dialog::settings_dialog(std::shared_ptr guiSettings, std: colorDialog(gui::mw_toolIconColor, tr("Choose tool icon color"), ui->pb_tool_icon_color); }); - ui->gs_disableMouse->setChecked(xgui_settings->GetValue(gui::gs_disableMouse).toBool()); - connect(ui->gs_disableMouse, &QCheckBox::clicked, [=](bool val) - { - xgui_settings->SetValue(gui::gs_disableMouse, val); - }); - - bool enableButtons = xgui_settings->GetValue(gui::gs_resize).toBool(); - ui->gs_resizeOnBoot->setChecked(enableButtons); - ui->gs_width->setEnabled(enableButtons); - ui->gs_height->setEnabled(enableButtons); - - QRect screen = QApplication::desktop()->screenGeometry(); - int width = xgui_settings->GetValue(gui::gs_width).toInt(); - int height = xgui_settings->GetValue(gui::gs_height).toInt(); - ui->gs_width->setValue(std::min(width, screen.width())); - ui->gs_height->setValue(std::min(height, screen.height())); - - connect(ui->gs_resizeOnBoot, &QCheckBox::clicked, [=](bool val) - { - xgui_settings->SetValue(gui::gs_resize, val); - ui->gs_width->setEnabled(val); - ui->gs_height->setEnabled(val); - }); - connect(ui->gs_width, &QSpinBox::editingFinished, [=]() - { - ui->gs_width->setValue(std::min(ui->gs_width->value(), QApplication::desktop()->screenGeometry().width())); - xgui_settings->SetValue(gui::gs_width, ui->gs_width->value()); - }); - connect(ui->gs_height, &QSpinBox::editingFinished, [=]() - { - ui->gs_height->setValue(std::min(ui->gs_height->value(), QApplication::desktop()->screenGeometry().height())); - xgui_settings->SetValue(gui::gs_height, ui->gs_height->value()); - }); - - ui->useRichPresence->setChecked(xgui_settings->GetValue(gui::m_richPresence).toBool()); - - connect(ui->useRichPresence, &QCheckBox::clicked, [=](bool val) - { - xgui_settings->SetValue(gui::m_richPresence, val); - }); - AddConfigs(); AddStylesheets(); } diff --git a/rpcs3/rpcs3qt/settings_dialog.ui b/rpcs3/rpcs3qt/settings_dialog.ui index 6111c7244c..2a5da0ee63 100644 --- a/rpcs3/rpcs3qt/settings_dialog.ui +++ b/rpcs3/rpcs3qt/settings_dialog.ui @@ -6,8 +6,8 @@ 0 0 - 816 - 570 + 752 + 519 @@ -1228,13 +1228,6 @@ Emulator Settings - - - - Show Welcome Screen - - - @@ -1284,13 +1277,6 @@ - - - - Use Discord Rich Presence - - - @@ -1419,68 +1405,89 @@ - - - UI Colors + + + Qt::Vertical - - - - - Use custom UI Colors - - - - - - - Main window tool bar - - - - - - - Main window tool icons - - - - - - - Gamelist icons - - - - - - - Qt::Vertical - - - QSizePolicy::MinimumExpanding - - - - 0 - 0 - - - - - - + + QSizePolicy::MinimumExpanding + + + + 0 + 0 + + + - + + + + + + + + Qt::Vertical + + + QSizePolicy::MinimumExpanding + + + + 0 + 0 + + + + + + + + Description + + + + + + Point your mouse at an option to display a description in here. + + + + + + Qt::PlainText + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + true + + + + + + + + + + + GUI + + + + + + UI Stylesheets - + @@ -1494,6 +1501,83 @@ + + + + + + UI Colors + + + + + + Use custom UI Colors + + + + + + + Main window tool bar + + + + + + + Main window tool icons + + + + + + + Gamelist icons + + + + + + + + + + Qt::Vertical + + + QSizePolicy::MinimumExpanding + + + + 0 + 0 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::MinimumExpanding + + + + 0 + 0 + + + + + + + + @@ -1522,7 +1606,17 @@ - + + + + + + Apply + + + + + Qt::Vertical @@ -1537,16 +1631,49 @@ + + + + + + + + + + + UI Options + + - - - - + - Apply + Show Welcome Screen + + + + Use Discord Rich Presence + + + + + + + Qt::Vertical + + + QSizePolicy::MinimumExpanding + + + + 13 + 13 + + + + @@ -1555,7 +1682,7 @@ - + Qt::Vertical @@ -1571,13 +1698,13 @@ - + Description - + - + Point your mouse at an option to display a description in here.