diff --git a/pcsx2-qt/GameList/GameListModel.cpp b/pcsx2-qt/GameList/GameListModel.cpp index c81de308c6..c3909ddeb1 100644 --- a/pcsx2-qt/GameList/GameListModel.cpp +++ b/pcsx2-qt/GameList/GameListModel.cpp @@ -269,30 +269,19 @@ QVariant GameListModel::data(const QModelIndex& index, int role) const { case Column_Type: { - switch (ge->type) - { - case GameList::EntryType::PS1Disc: - case GameList::EntryType::PS2Disc: - // return ((ge->settings.GetUserSettingsCount() > 0) ? m_type_disc_with_settings_pixmap : // m_type_disc_pixmap); - return m_type_disc_pixmap; - case GameList::EntryType::Playlist: - return m_type_playlist_pixmap; - case GameList::EntryType::ELF: - default: - return m_type_exe_pixmap; - } + return m_type_pixmaps[static_cast(ge->type)]; } case Column_Region: { - return m_region_pixmaps[static_cast(ge->region)]; + return m_region_pixmaps[static_cast(ge->region)]; } case Column_Compatibility: { - return m_compatibility_pixmaps[static_cast( + return m_compatibility_pixmaps[static_cast( (static_cast(ge->compatibility_rating) >= GameList::CompatibilityRatingCount) ? - GameList::CompatibilityRating::Unknown : + GameList::CompatibilityRating::Unknown : ge->compatibility_rating)]; } @@ -451,22 +440,38 @@ bool GameListModel::lessThan(const QModelIndex& left_index, const QModelIndex& r } } +QIcon GameListModel::getIconForType(GameList::EntryType type) +{ + switch (type) + { + case GameList::EntryType::PS2Disc: + case GameList::EntryType::PS1Disc: + return QIcon(QStringLiteral(":/icons/media-optical-24.png")); + + case GameList::EntryType::Playlist: + return QIcon(QStringLiteral(":/icons/address-book-new-22.png")); + + case GameList::EntryType::ELF: + default: + return QIcon(QStringLiteral(":/icons/applications-system-24.png")); + } +} + +QIcon GameListModel::getIconForRegion(GameList::Region region) +{ + return QIcon( + QStringLiteral("%1/icons/flags/%2.png").arg(QtHost::GetResourcesBasePath()).arg(GameList::RegionToString(region))); +} + void GameListModel::loadCommonImages() { - m_type_disc_pixmap = QIcon(QStringLiteral(":/icons/media-optical-24.png")).pixmap(QSize(24, 24)); - m_type_disc_with_settings_pixmap = QIcon(QStringLiteral(":/icons/media-optical-gear-24.png")).pixmap(QSize(24, 24)); - m_type_exe_pixmap = QIcon(QStringLiteral(":/icons/applications-system-24.png")).pixmap(QSize(24, 24)); - m_type_playlist_pixmap = QIcon(QStringLiteral(":/icons/address-book-new-22.png")).pixmap(QSize(22, 22)); + for (u32 type = 0; type < static_cast(GameList::EntryType::Count); type++) + m_type_pixmaps[type] = getIconForType(static_cast(type)).pixmap(QSize(24, 24)); + + for (u32 i = 0; i < static_cast(GameList::Region::Count); i++) + m_region_pixmaps[i] = getIconForRegion(static_cast(i)).pixmap(QSize(42, 30)); const QString base_path(QtHost::GetResourcesBasePath()); - - for (u32 i = 0; i < static_cast(GameList::Region::Count); i++) - { - m_region_pixmaps[i] = QIcon( - QStringLiteral("%1/icons/flags/%2.png").arg(base_path).arg(GameList::RegionToString(static_cast(i)))) - .pixmap(QSize(42, 30)); - } - for (u32 i = 1; i < GameList::CompatibilityRatingCount; i++) m_compatibility_pixmaps[i].load(QStringLiteral("%1/icons/star-%2.png").arg(base_path).arg(i - 1)); diff --git a/pcsx2-qt/GameList/GameListModel.h b/pcsx2-qt/GameList/GameListModel.h index a782a5fc94..8cc02baed9 100644 --- a/pcsx2-qt/GameList/GameListModel.h +++ b/pcsx2-qt/GameList/GameListModel.h @@ -45,6 +45,9 @@ public: static std::optional getColumnIdForName(std::string_view name); static const char* getColumnName(Column col); + static QIcon getIconForType(GameList::EntryType type); + static QIcon getIconForRegion(GameList::Region region); + GameListModel(QObject* parent = nullptr); ~GameListModel(); @@ -79,12 +82,8 @@ private: bool m_show_titles_for_covers = false; std::array m_column_display_names; - - QPixmap m_type_disc_pixmap; - QPixmap m_type_disc_with_settings_pixmap; - QPixmap m_type_exe_pixmap; - QPixmap m_type_playlist_pixmap; - QPixmap m_region_pixmaps[static_cast(GameList::Region::Count)]; + std::array(GameList::EntryType::Count)> m_type_pixmaps; + std::array(GameList::Region::Count)> m_region_pixmaps; QPixmap m_placeholder_pixmap; std::array(GameList::CompatibilityRatingCount)> m_compatibility_pixmaps; diff --git a/pcsx2-qt/GameList/GameListWidget.cpp b/pcsx2-qt/GameList/GameListWidget.cpp index e119c81198..28ff012f58 100644 --- a/pcsx2-qt/GameList/GameListWidget.cpp +++ b/pcsx2-qt/GameList/GameListWidget.cpp @@ -40,6 +40,9 @@ static const char* SUPPORTED_FORMATS_STRING = QT_TRANSLATE_NOOP(GameListWidget, ".cso (Compressed ISO)\n" ".gz (Gzip Compressed ISO)"); +static constexpr float MIN_SCALE = 0.1f; +static constexpr float MAX_SCALE = 2.0f; + class GameListSortModel final : public QSortFilterProxyModel { public: @@ -49,9 +52,38 @@ public: { } + void setFilterType(GameList::EntryType type) + { + m_filter_type = type; + invalidateRowsFilter(); + } + void setFilterRegion(GameList::Region region) + { + m_filter_region = region; + invalidateRowsFilter(); + } + void setFilterName(const QString& name) + { + m_filter_name = name; + invalidateRowsFilter(); + } + bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const override { - // TODO: Search + if (m_filter_type != GameList::EntryType::Count || + m_filter_region != GameList::Region::Count || + !m_filter_name.isEmpty()) + { + const auto lock = GameList::GetLock(); + const GameList::Entry* entry = GameList::GetEntryByIndex(source_row); + if (m_filter_type != GameList::EntryType::Count && entry->type != m_filter_type) + return false; + if (m_filter_region != GameList::Region::Count && entry->region != m_filter_region) + return false; + if (!m_filter_name.isEmpty() && !QString::fromStdString(entry->title).contains(m_filter_name, Qt::CaseInsensitive)) + return false; + } + return QSortFilterProxyModel::filterAcceptsRow(source_row, source_parent); } @@ -62,10 +94,13 @@ public: private: GameListModel* m_model; + GameList::EntryType m_filter_type = GameList::EntryType::Count; + GameList::Region m_filter_region = GameList::Region::Count; + QString m_filter_name; }; GameListWidget::GameListWidget(QWidget* parent /* = nullptr */) - : QStackedWidget(parent) + : QWidget(parent) { } @@ -79,7 +114,34 @@ void GameListWidget::initialize() m_sort_model = new GameListSortModel(m_model); m_sort_model->setSourceModel(m_model); - m_table_view = new QTableView(this); + + m_ui.setupUi(this); + for (u32 type = 0; type < static_cast(GameList::EntryType::Count); type++) + { + m_ui.filterType->addItem(GameListModel::getIconForType(static_cast(type)), + qApp->translate("GameList", GameList::EntryTypeToDisplayString(static_cast(type)))); + } + for (u32 region = 0; region < static_cast(GameList::Region::Count); region++) + { + m_ui.filterRegion->addItem(GameListModel::getIconForRegion(static_cast(region)), + qApp->translate("GameList", GameList::RegionToString(static_cast(region)))); + } + + connect(m_ui.viewGameList, &QPushButton::clicked, this, &GameListWidget::showGameList); + connect(m_ui.viewGameGrid, &QPushButton::clicked, this, &GameListWidget::showGameGrid); + connect(m_ui.gridScale, &QSlider::valueChanged, this, &GameListWidget::gridIntScale); + connect(m_ui.viewGridTitles, &QPushButton::toggled, this, &GameListWidget::setShowCoverTitles); + connect(m_ui.filterType, &QComboBox::currentIndexChanged, this, [this](int index) { + m_sort_model->setFilterType((index == 0) ? GameList::EntryType::Count : static_cast(index - 1)); + }); + connect(m_ui.filterRegion, &QComboBox::currentIndexChanged, this, [this](int index) { + m_sort_model->setFilterRegion((index == 0) ? GameList::Region::Count : static_cast(index - 1)); + }); + connect(m_ui.searchText, &QLineEdit::textChanged, this, [this](const QString& text) { + m_sort_model->setFilterName(text); + }); + + m_table_view = new QTableView(m_ui.stack); m_table_view->setModel(m_sort_model); m_table_view->setSortingEnabled(true); m_table_view->setSelectionMode(QAbstractItemView::SingleSelection); @@ -107,9 +169,9 @@ void GameListWidget::initialize() connect(m_table_view->horizontalHeader(), &QHeaderView::sortIndicatorChanged, this, &GameListWidget::onTableViewHeaderSortIndicatorChanged); - insertWidget(0, m_table_view); + m_ui.stack->insertWidget(0, m_table_view); - m_list_view = new GameListGridListView(this); + m_list_view = new GameListGridListView(m_ui.stack); m_list_view->setModel(m_sort_model); m_list_view->setModelColumn(GameListModel::Column_Cover); m_list_view->setSelectionMode(QAbstractItemView::ExtendedSelection); @@ -131,31 +193,32 @@ void GameListWidget::initialize() connect(m_list_view, &QListView::activated, this, &GameListWidget::onListViewItemActivated); connect(m_list_view, &QListView::customContextMenuRequested, this, &GameListWidget::onListViewContextMenuRequested); - insertWidget(1, m_list_view); + m_ui.stack->insertWidget(1, m_list_view); - m_empty_widget = new QWidget(this); + m_empty_widget = new QWidget(m_ui.stack); m_empty_ui.setupUi(m_empty_widget); m_empty_ui.supportedFormats->setText(qApp->translate("GameListWidget", SUPPORTED_FORMATS_STRING)); connect(m_empty_ui.addGameDirectory, &QPushButton::clicked, this, [this]() { emit addGameDirectoryRequested(); }); connect(m_empty_ui.scanForNewGames, &QPushButton::clicked, this, [this]() { refresh(false); }); - insertWidget(2, m_empty_widget); + m_ui.stack->insertWidget(2, m_empty_widget); if (Host::GetBaseBoolSettingValue("UI", "GameListGridView", false)) - setCurrentIndex(1); + m_ui.stack->setCurrentIndex(1); else - setCurrentIndex(0); + m_ui.stack->setCurrentIndex(0); + updateToolbar(); resizeTableViewColumnsToFit(); } bool GameListWidget::isShowingGameList() const { - return currentIndex() == 0; + return m_ui.stack->currentIndex() == 0; } bool GameListWidget::isShowingGameGrid() const { - return currentIndex() == 1; + return m_ui.stack->currentIndex() == 1; } bool GameListWidget::getShowGridCoverTitles() const @@ -189,8 +252,8 @@ void GameListWidget::cancelRefresh() void GameListWidget::onRefreshProgress(const QString& status, int current, int total) { // switch away from the placeholder while we scan, in case we find anything - if (currentIndex() == 2) - setCurrentIndex(Host::GetBaseBoolSettingValue("UI", "GameListGridView", false) ? 1 : 0); + if (m_ui.stack->currentIndex() == 2) + m_ui.stack->setCurrentIndex(Host::GetBaseBoolSettingValue("UI", "GameListGridView", false) ? 1 : 0); m_model->refresh(); emit refreshProgress(status, current, total); @@ -208,7 +271,7 @@ void GameListWidget::onRefreshComplete() // if we still had no games, switch to the helper widget if (m_model->rowCount() == 0) - setCurrentIndex(2); + m_ui.stack->setCurrentIndex(2); } void GameListWidget::onSelectionModelCurrentChanged(const QModelIndex& current, const QModelIndex& previous) @@ -277,13 +340,11 @@ void GameListWidget::onTableViewHeaderSortIndicatorChanged(int, Qt::SortOrder) void GameListWidget::listZoom(float delta) { - static constexpr float MIN_SCALE = 0.1f; - static constexpr float MAX_SCALE = 2.0f; - const float new_scale = std::clamp(m_model->getCoverScale() + delta, MIN_SCALE, MAX_SCALE); QtHost::SetBaseFloatSettingValue("UI", "GameListCoverArtScale", new_scale); m_model->setCoverScale(new_scale); updateListFont(); + updateToolbar(); m_model->refresh(); } @@ -298,6 +359,18 @@ void GameListWidget::gridZoomOut() listZoom(-0.05f); } +void GameListWidget::gridIntScale(int int_scale) +{ + const float new_scale = std::clamp(static_cast(int_scale) / 100.0f, MIN_SCALE, MAX_SCALE); + + QtHost::SetBaseFloatSettingValue("UI", "GameListCoverArtScale", new_scale); + m_model->setCoverScale(new_scale); + updateListFont(); + updateToolbar(); + + m_model->refresh(); +} + void GameListWidget::refreshGridCovers() { m_model->refreshCovers(); @@ -305,21 +378,33 @@ void GameListWidget::refreshGridCovers() void GameListWidget::showGameList() { - if (currentIndex() == 0 || m_model->rowCount() == 0) + if (m_ui.stack->currentIndex() == 0 || m_model->rowCount() == 0) + { + // We can click the toolbar multiple times, so keep it correct. + updateToolbar(); return; + } QtHost::SetBaseBoolSettingValue("UI", "GameListGridView", false); - setCurrentIndex(0); + m_ui.stack->setCurrentIndex(0); resizeTableViewColumnsToFit(); + updateToolbar(); + emit layoutChange(); } void GameListWidget::showGameGrid() { - if (currentIndex() == 1 || m_model->rowCount() == 0) + if (m_ui.stack->currentIndex() == 1 || m_model->rowCount() == 0) + { + // We can click the toolbar multiple times, so keep it correct. + updateToolbar(); return; + } QtHost::SetBaseBoolSettingValue("UI", "GameListGridView", true); - setCurrentIndex(1); + m_ui.stack->setCurrentIndex(1); + updateToolbar(); + emit layoutChange(); } void GameListWidget::setShowCoverTitles(bool enabled) @@ -331,6 +416,8 @@ void GameListWidget::setShowCoverTitles(bool enabled) m_model->setShowCoverTitles(enabled); if (isShowingGameGrid()) m_model->refresh(); + updateToolbar(); + emit layoutChange(); } void GameListWidget::updateListFont() @@ -340,9 +427,33 @@ void GameListWidget::updateListFont() m_list_view->setFont(font); } +void GameListWidget::updateToolbar() +{ + const bool grid_view = isShowingGameGrid(); + { + QSignalBlocker sb(m_ui.viewGameGrid); + m_ui.viewGameGrid->setChecked(grid_view); + } + { + QSignalBlocker sb(m_ui.viewGameList); + m_ui.viewGameList->setChecked(!grid_view); + } + { + QSignalBlocker sb(m_ui.viewGridTitles); + m_ui.viewGridTitles->setChecked(m_model->getShowCoverTitles()); + } + { + QSignalBlocker sb(m_ui.gridScale); + m_ui.gridScale->setValue(static_cast(m_model->getCoverScale() * 100.0f)); + } + + m_ui.viewGridTitles->setEnabled(grid_view); + m_ui.gridScale->setEnabled(grid_view); +} + void GameListWidget::resizeEvent(QResizeEvent* event) { - QStackedWidget::resizeEvent(event); + QWidget::resizeEvent(event); resizeTableViewColumnsToFit(); } @@ -431,7 +542,7 @@ void GameListWidget::saveTableViewColumnSortSettings() const GameList::Entry* GameListWidget::getSelectedEntry() const { - if (currentIndex() == 0) + if (m_ui.stack->currentIndex() == 0) { const QItemSelectionModel* selection_model = m_table_view->selectionModel(); if (!selection_model->hasSelection()) diff --git a/pcsx2-qt/GameList/GameListWidget.h b/pcsx2-qt/GameList/GameListWidget.h index 6ba453ec53..1e920adccb 100644 --- a/pcsx2-qt/GameList/GameListWidget.h +++ b/pcsx2-qt/GameList/GameListWidget.h @@ -16,8 +16,8 @@ #pragma once #include "pcsx2/Frontend/GameList.h" #include "ui_EmptyGameListWidget.h" +#include "ui_GameListWidget.h" #include -#include #include Q_DECLARE_METATYPE(const GameList::Entry*); @@ -41,7 +41,7 @@ protected: void wheelEvent(QWheelEvent* e); }; -class GameListWidget : public QStackedWidget +class GameListWidget : public QWidget { Q_OBJECT @@ -59,7 +59,6 @@ public: bool isShowingGameList() const; bool isShowingGameGrid() const; - bool getShowGridCoverTitles() const; const GameList::Entry* getSelectedEntry() const; @@ -73,6 +72,7 @@ Q_SIGNALS: void entryContextMenuRequested(const QPoint& point); void addGameDirectoryRequested(); + void layoutChange(); private Q_SLOTS: void onRefreshProgress(const QString& status, int current, int total); @@ -92,6 +92,7 @@ public Q_SLOTS: void setShowCoverTitles(bool enabled); void gridZoomIn(); void gridZoomOut(); + void gridIntScale(int int_scale); void refreshGridCovers(); protected: @@ -105,6 +106,9 @@ private: void saveTableViewColumnSortSettings(); void listZoom(float delta); void updateListFont(); + void updateToolbar(); + + Ui::GameListWidget m_ui; GameListModel* m_model = nullptr; GameListSortModel* m_sort_model = nullptr; diff --git a/pcsx2-qt/GameList/GameListWidget.ui b/pcsx2-qt/GameList/GameListWidget.ui new file mode 100644 index 0000000000..7fa2956894 --- /dev/null +++ b/pcsx2-qt/GameList/GameListWidget.ui @@ -0,0 +1,220 @@ + + + GameListWidget + + + + 0 + 0 + 758 + 619 + + + + Form + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 3 + + + 3 + + + 3 + + + 3 + + + + + 3 + + + + + + 32 + 0 + + + + Game List + + + + .. + + + true + + + true + + + + + + + + 32 + 0 + + + + Game Grid + + + + .. + + + true + + + true + + + + + + + + 32 + 0 + + + + Show Titles + + + + .. + + + true + + + true + + + + + + + + 125 + 0 + + + + + 125 + 16777215 + + + + 10 + + + 200 + + + Qt::Horizontal + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 6 + + + + + + All Types + + + + .. + + + + + + + + + All Regions + + + + .. + + + + + + + + + 150 + 0 + + + + Search... + + + true + + + + + + + + + + + + + + + + + diff --git a/pcsx2-qt/MainWindow.cpp b/pcsx2-qt/MainWindow.cpp index d153ac4246..579933d011 100644 --- a/pcsx2-qt/MainWindow.cpp +++ b/pcsx2-qt/MainWindow.cpp @@ -300,6 +300,10 @@ void MainWindow::connectSignals() m_game_list_widget->gridZoomOut(); }); connect(m_ui.actionGridViewRefreshCovers, &QAction::triggered, m_game_list_widget, &GameListWidget::refreshGridCovers); + connect(m_game_list_widget, &GameListWidget::layoutChange, this, [this]() { + QSignalBlocker sb(m_ui.actionGridViewShowTitles); + m_ui.actionGridViewShowTitles->setChecked(m_game_list_widget->getShowGridCoverTitles()); + }); SettingWidgetBinder::BindWidgetToBoolSetting(nullptr, m_ui.actionViewStatusBarVerbose, "UI", "VerboseStatusBar", false); @@ -534,6 +538,7 @@ void MainWindow::setStyleFromSettings() darkPalette.setColor(QPalette::Link, blue); darkPalette.setColor(QPalette::Highlight, lighterGray); darkPalette.setColor(QPalette::HighlightedText, Qt::white); + darkPalette.setColor(QPalette::PlaceholderText, QColor(Qt::white).darker()); darkPalette.setColor(QPalette::Active, QPalette::Button, gray.darker()); darkPalette.setColor(QPalette::Disabled, QPalette::ButtonText, gray); @@ -569,6 +574,7 @@ void MainWindow::setStyleFromSettings() darkPalette.setColor(QPalette::Link, blue); darkPalette.setColor(QPalette::Highlight, blue2); darkPalette.setColor(QPalette::HighlightedText, Qt::white); + darkPalette.setColor(QPalette::PlaceholderText, QColor(Qt::white).darker()); darkPalette.setColor(QPalette::Active, QPalette::Button, gray.darker()); darkPalette.setColor(QPalette::Disabled, QPalette::ButtonText, gray); diff --git a/pcsx2-qt/pcsx2-qt.vcxproj b/pcsx2-qt/pcsx2-qt.vcxproj index 1e3c584711..e7e785b412 100644 --- a/pcsx2-qt/pcsx2-qt.vcxproj +++ b/pcsx2-qt/pcsx2-qt.vcxproj @@ -265,6 +265,9 @@ Document + + Document + Document diff --git a/pcsx2-qt/pcsx2-qt.vcxproj.filters b/pcsx2-qt/pcsx2-qt.vcxproj.filters index 6bf932a4ad..aa24a55c49 100644 --- a/pcsx2-qt/pcsx2-qt.vcxproj.filters +++ b/pcsx2-qt/pcsx2-qt.vcxproj.filters @@ -399,6 +399,9 @@ GameList + + GameList + Tools\Input Recording diff --git a/pcsx2-qt/resources/icons/black/svg/filter-line.svg b/pcsx2-qt/resources/icons/black/svg/filter-line.svg new file mode 100644 index 0000000000..195394b149 --- /dev/null +++ b/pcsx2-qt/resources/icons/black/svg/filter-line.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/pcsx2-qt/resources/icons/black/svg/global-line.svg b/pcsx2-qt/resources/icons/black/svg/global-line.svg new file mode 100644 index 0000000000..830359dae1 --- /dev/null +++ b/pcsx2-qt/resources/icons/black/svg/global-line.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/pcsx2-qt/resources/icons/black/svg/price-tag-3-line.svg b/pcsx2-qt/resources/icons/black/svg/price-tag-3-line.svg new file mode 100644 index 0000000000..3511dc1655 --- /dev/null +++ b/pcsx2-qt/resources/icons/black/svg/price-tag-3-line.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/pcsx2-qt/resources/icons/white/svg/filter-line.svg b/pcsx2-qt/resources/icons/white/svg/filter-line.svg new file mode 100644 index 0000000000..3953235f60 --- /dev/null +++ b/pcsx2-qt/resources/icons/white/svg/filter-line.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/pcsx2-qt/resources/icons/white/svg/global-line.svg b/pcsx2-qt/resources/icons/white/svg/global-line.svg new file mode 100644 index 0000000000..030979a502 --- /dev/null +++ b/pcsx2-qt/resources/icons/white/svg/global-line.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/pcsx2-qt/resources/icons/white/svg/price-tag-3-line.svg b/pcsx2-qt/resources/icons/white/svg/price-tag-3-line.svg new file mode 100644 index 0000000000..02ad878cc8 --- /dev/null +++ b/pcsx2-qt/resources/icons/white/svg/price-tag-3-line.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/pcsx2-qt/resources/resources.qrc b/pcsx2-qt/resources/resources.qrc index 74ae942578..9561d481ff 100644 --- a/pcsx2-qt/resources/resources.qrc +++ b/pcsx2-qt/resources/resources.qrc @@ -20,6 +20,7 @@ icons/black/svg/file-reduce-line.svg icons/black/svg/file-search-line.svg icons/black/svg/file-settings-line.svg + icons/black/svg/filter-line.svg icons/black/svg/flask-line.svg icons/black/svg/folder-add-line.svg icons/black/svg/folder-open-line.svg @@ -28,12 +29,14 @@ icons/black/svg/fullscreen-line.svg icons/black/svg/function-line.svg icons/black/svg/gamepad-line.svg + icons/black/svg/global-line.svg icons/black/svg/hard-drive-2-line.svg icons/black/svg/keyboard-line.svg icons/black/svg/layout-grid-line.svg icons/black/svg/list-check.svg icons/black/svg/pause-line.svg icons/black/svg/play-line.svg + icons/black/svg/price-tag-3-line.svg icons/black/svg/refresh-line.svg icons/black/svg/restart-line.svg icons/black/svg/save-3-line.svg @@ -69,6 +72,7 @@ icons/white/svg/file-reduce-line.svg icons/white/svg/file-search-line.svg icons/white/svg/file-settings-line.svg + icons/white/svg/filter-line.svg icons/white/svg/flask-line.svg icons/white/svg/folder-add-line.svg icons/white/svg/folder-open-line.svg @@ -77,12 +81,14 @@ icons/white/svg/fullscreen-line.svg icons/white/svg/function-line.svg icons/white/svg/gamepad-line.svg + icons/white/svg/global-line.svg icons/white/svg/hard-drive-2-line.svg icons/white/svg/keyboard-line.svg icons/white/svg/layout-grid-line.svg icons/white/svg/list-check.svg icons/white/svg/pause-line.svg icons/white/svg/play-line.svg + icons/white/svg/price-tag-3-line.svg icons/white/svg/refresh-line.svg icons/white/svg/restart-line.svg icons/white/svg/save-3-line.svg diff --git a/pcsx2/Frontend/GameList.cpp b/pcsx2/Frontend/GameList.cpp index 2ef62b7029..6de514677e 100644 --- a/pcsx2/Frontend/GameList.cpp +++ b/pcsx2/Frontend/GameList.cpp @@ -86,6 +86,12 @@ const char* GameList::EntryTypeToString(EntryType type) return names[static_cast(type)]; } +const char* GameList::EntryTypeToDisplayString(EntryType type) +{ + static std::array(EntryType::Count)> names = {{"PS2 Disc", "PS1 Disc", "ELF", "Playlist"}}; + return names[static_cast(type)]; +} + const char* GameList::RegionToString(Region region) { static std::array(Region::Count)> names = { diff --git a/pcsx2/Frontend/GameList.h b/pcsx2/Frontend/GameList.h index 3eb2cdd40a..7cbfb9d277 100644 --- a/pcsx2/Frontend/GameList.h +++ b/pcsx2/Frontend/GameList.h @@ -96,6 +96,7 @@ namespace GameList }; const char* EntryTypeToString(EntryType type); + const char* EntryTypeToDisplayString(EntryType type); const char* RegionToString(Region region); const char* EntryCompatibilityRatingToString(CompatibilityRating rating);