mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-02 23:42:43 +00:00
TR - Button in Utils +icon
TR - Button in Utils +icon I also made a small correction to the game folder list, where the checkboxes were being filled in incorrectly.
This commit is contained in:
parent
ed45a12adc
commit
5cc25f9e10
@ -30,6 +30,7 @@ path = [
|
||||
"src/images/dump_icon.png",
|
||||
"src/images/exit_icon.png",
|
||||
"src/images/file_icon.png",
|
||||
"src/images/trophy_icon.png",
|
||||
"src/images/flag_china.png",
|
||||
"src/images/flag_eu.png",
|
||||
"src/images/flag_jp.png",
|
||||
|
@ -645,7 +645,11 @@ const std::vector<std::filesystem::path> getGameInstallDirs() {
|
||||
}
|
||||
|
||||
const std::vector<bool> getGameInstallDirsEnabled() {
|
||||
return install_dirs_enabled;
|
||||
std::vector<bool> enabled_dirs;
|
||||
for (const auto& dir : settings_install_dirs) {
|
||||
enabled_dirs.push_back(dir.enabled);
|
||||
}
|
||||
return enabled_dirs;
|
||||
}
|
||||
|
||||
std::filesystem::path getAddonInstallDir() {
|
||||
|
BIN
src/images/trophy_icon.png
Normal file
BIN
src/images/trophy_icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
@ -593,6 +593,60 @@ void MainWindow::CreateConnects() {
|
||||
pkgViewer->show();
|
||||
});
|
||||
|
||||
// Trophy Viewer
|
||||
connect(ui->trophyViewerAct, &QAction::triggered, this, [this]() {
|
||||
if (m_game_info->m_games.empty()) {
|
||||
QMessageBox::information(
|
||||
this, tr("Trophy Viewer"),
|
||||
tr("No games found. Please add your games to your library first."));
|
||||
return;
|
||||
}
|
||||
|
||||
const auto& firstGame = m_game_info->m_games[0];
|
||||
QString trophyPath, gameTrpPath;
|
||||
Common::FS::PathToQString(trophyPath, firstGame.serial);
|
||||
Common::FS::PathToQString(gameTrpPath, firstGame.path);
|
||||
|
||||
auto game_update_path = Common::FS::PathFromQString(gameTrpPath);
|
||||
game_update_path += "-UPDATE";
|
||||
if (std::filesystem::exists(game_update_path)) {
|
||||
Common::FS::PathToQString(gameTrpPath, game_update_path);
|
||||
} else {
|
||||
game_update_path = Common::FS::PathFromQString(gameTrpPath);
|
||||
game_update_path += "-patch";
|
||||
if (std::filesystem::exists(game_update_path)) {
|
||||
Common::FS::PathToQString(gameTrpPath, game_update_path);
|
||||
}
|
||||
}
|
||||
|
||||
QVector<TrophyGameInfo> allTrophyGames;
|
||||
for (const auto& game : m_game_info->m_games) {
|
||||
TrophyGameInfo gameInfo;
|
||||
gameInfo.name = QString::fromStdString(game.name);
|
||||
Common::FS::PathToQString(gameInfo.trophyPath, game.serial);
|
||||
Common::FS::PathToQString(gameInfo.gameTrpPath, game.path);
|
||||
|
||||
auto update_path = Common::FS::PathFromQString(gameInfo.gameTrpPath);
|
||||
update_path += "-UPDATE";
|
||||
if (std::filesystem::exists(update_path)) {
|
||||
Common::FS::PathToQString(gameInfo.gameTrpPath, update_path);
|
||||
} else {
|
||||
update_path = Common::FS::PathFromQString(gameInfo.gameTrpPath);
|
||||
update_path += "-patch";
|
||||
if (std::filesystem::exists(update_path)) {
|
||||
Common::FS::PathToQString(gameInfo.gameTrpPath, update_path);
|
||||
}
|
||||
}
|
||||
|
||||
allTrophyGames.append(gameInfo);
|
||||
}
|
||||
|
||||
QString gameName = QString::fromStdString(firstGame.name);
|
||||
TrophyViewer* trophyViewer =
|
||||
new TrophyViewer(trophyPath, gameTrpPath, gameName, allTrophyGames);
|
||||
trophyViewer->show();
|
||||
});
|
||||
|
||||
// Themes
|
||||
connect(ui->setThemeDark, &QAction::triggered, &m_window_themes, [this]() {
|
||||
m_window_themes.SetWindowTheme(Theme::Dark, ui->mw_searchbar);
|
||||
@ -1169,6 +1223,7 @@ void MainWindow::SetUiIcons(bool isWhite) {
|
||||
ui->refreshGameListAct->setIcon(RecolorIcon(ui->refreshGameListAct->icon(), isWhite));
|
||||
ui->menuGame_List_Mode->setIcon(RecolorIcon(ui->menuGame_List_Mode->icon(), isWhite));
|
||||
ui->pkgViewerAct->setIcon(RecolorIcon(ui->pkgViewerAct->icon(), isWhite));
|
||||
ui->trophyViewerAct->setIcon(RecolorIcon(ui->trophyViewerAct->icon(), isWhite));
|
||||
ui->configureAct->setIcon(RecolorIcon(ui->configureAct->icon(), isWhite));
|
||||
ui->addElfFolderAct->setIcon(RecolorIcon(ui->addElfFolderAct->icon(), isWhite));
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ public:
|
||||
QAction* downloadCheatsPatchesAct;
|
||||
QAction* dumpGameListAct;
|
||||
QAction* pkgViewerAct;
|
||||
QAction* trophyViewerAct;
|
||||
#ifdef ENABLE_UPDATER
|
||||
QAction* updaterAct;
|
||||
#endif
|
||||
@ -139,6 +140,10 @@ public:
|
||||
pkgViewerAct = new QAction(MainWindow);
|
||||
pkgViewerAct->setObjectName("pkgViewer");
|
||||
pkgViewerAct->setIcon(QIcon(":images/file_icon.png"));
|
||||
trophyViewerAct = new QAction(MainWindow);
|
||||
trophyViewerAct->setObjectName("trophyViewer");
|
||||
trophyViewerAct->setIcon(QIcon(":images/trophy_icon.png"));
|
||||
|
||||
#ifdef ENABLE_UPDATER
|
||||
updaterAct = new QAction(MainWindow);
|
||||
updaterAct->setObjectName("updaterAct");
|
||||
@ -321,6 +326,7 @@ public:
|
||||
menuUtils->addAction(downloadCheatsPatchesAct);
|
||||
menuUtils->addAction(dumpGameListAct);
|
||||
menuUtils->addAction(pkgViewerAct);
|
||||
menuUtils->addAction(trophyViewerAct);
|
||||
#ifdef ENABLE_UPDATER
|
||||
menuHelp->addAction(updaterAct);
|
||||
#endif
|
||||
@ -379,6 +385,8 @@ public:
|
||||
dumpGameListAct->setText(
|
||||
QCoreApplication::translate("MainWindow", "Dump Game List", nullptr));
|
||||
pkgViewerAct->setText(QCoreApplication::translate("MainWindow", "PKG Viewer", nullptr));
|
||||
trophyViewerAct->setText(
|
||||
QCoreApplication::translate("MainWindow", "Trophy Viewer", nullptr));
|
||||
mw_searchbar->setPlaceholderText(
|
||||
QCoreApplication::translate("MainWindow", "Search...", nullptr));
|
||||
menuFile->setTitle(QCoreApplication::translate("MainWindow", "File", nullptr));
|
||||
|
@ -1306,6 +1306,14 @@
|
||||
<source>Dump Game List</source>
|
||||
<translation>Dump Game List</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Trophy Viewer</source>
|
||||
<translation>Trophy Viewer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No games found. Please add your games to your library first.</source>
|
||||
<translation>No games found. Please add your games to your library first.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>PKG Viewer</source>
|
||||
<translation>PKG Viewer</translation>
|
||||
@ -2191,6 +2199,10 @@
|
||||
<source>Trophy Viewer</source>
|
||||
<translation>Trophy Viewer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Select Game:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Progress</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
@ -8,6 +8,7 @@
|
||||
<file>images/stop_icon.png</file>
|
||||
<file>images/utils_icon.png</file>
|
||||
<file>images/file_icon.png</file>
|
||||
<file>images/trophy_icon.png</file>
|
||||
<file>images/folder_icon.png</file>
|
||||
<file>images/themes_icon.png</file>
|
||||
<file>images/iconsize_icon.png</file>
|
||||
|
Loading…
Reference in New Issue
Block a user