mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-10 05:38:49 +00:00
Adding Top and Bottom trophy option for pop window + Trophy improvements (#2566)
* Adding top button option for trophy pop up * Ui fix * Clang format * improvements to trophy pr * improvements * Note: The sound will only work in QT versions * -. * Update path_util.cpp * Update path_util.cpp * centered text when using top and bottom option * Clang * trophy viewer now opens in window not fullscreen --------- Co-authored-by: DanielSvoboda <daniel.svoboda@hotmail.com>
This commit is contained in:
@@ -418,8 +418,14 @@ void SettingsDialog::LoadValuesFromConfig() {
|
||||
ui->disableTrophycheckBox->setChecked(
|
||||
toml::find_or<bool>(data, "General", "isTrophyPopupDisabled", false));
|
||||
ui->popUpDurationSpinBox->setValue(Config::getTrophyNotificationDuration());
|
||||
ui->radioButton_Left->setChecked(Config::leftSideTrophy());
|
||||
ui->radioButton_Right->setChecked(!ui->radioButton_Left->isChecked());
|
||||
|
||||
QString side = QString::fromStdString(Config::sideTrophy());
|
||||
|
||||
ui->radioButton_Left->setChecked(side == "left");
|
||||
ui->radioButton_Right->setChecked(side == "right");
|
||||
ui->radioButton_Top->setChecked(side == "top");
|
||||
ui->radioButton_Bottom->setChecked(side == "bottom");
|
||||
|
||||
ui->BGMVolumeSlider->setValue(toml::find_or<int>(data, "General", "BGMvolume", 50));
|
||||
ui->discordRPCCheckbox->setChecked(
|
||||
toml::find_or<bool>(data, "General", "enableDiscordRPC", true));
|
||||
@@ -612,7 +618,7 @@ void SettingsDialog::updateNoteTextEdit(const QString& elementName) {
|
||||
|
||||
//User
|
||||
if (elementName == "OpenCustomTrophyLocationButton") {
|
||||
text = tr("Open the custom trophy images/sounds folder:\\nYou can add custom images to the trophies and an audio.\\nAdd the files to custom_trophy with the following names:\\nthophy.mp3, bronze.png, gold.png, platinum.png, silver.png");
|
||||
text = tr("Open the custom trophy images/sounds folder:\\nYou can add custom images to the trophies and an audio.\\nAdd the files to custom_trophy with the following names:\\nthophy.mp3, bronze.png, gold.png, platinum.png, silver.png\\nNote: The sound will only work in QT versions.");
|
||||
}
|
||||
|
||||
// Input
|
||||
@@ -706,7 +712,17 @@ void SettingsDialog::UpdateSettings() {
|
||||
Config::setIsMotionControlsEnabled(ui->motionControlsCheckBox->isChecked());
|
||||
Config::setisTrophyPopupDisabled(ui->disableTrophycheckBox->isChecked());
|
||||
Config::setTrophyNotificationDuration(ui->popUpDurationSpinBox->value());
|
||||
Config::setLeftSideTrophy(ui->radioButton_Left->isChecked());
|
||||
|
||||
if (ui->radioButton_Top->isChecked()) {
|
||||
Config::setSideTrophy("top");
|
||||
} else if (ui->radioButton_Left->isChecked()) {
|
||||
Config::setSideTrophy("left");
|
||||
} else if (ui->radioButton_Right->isChecked()) {
|
||||
Config::setSideTrophy("right");
|
||||
} else if (ui->radioButton_Bottom->isChecked()) {
|
||||
Config::setSideTrophy("bottom");
|
||||
}
|
||||
|
||||
Config::setPlayBGM(ui->playBGMCheckBox->isChecked());
|
||||
Config::setAllowHDR(ui->enableHDRCheckBox->isChecked());
|
||||
Config::setLogType(logTypeMap.value(ui->logTypeComboBox->currentText()).toStdString());
|
||||
|
||||
Reference in New Issue
Block a user