From 07d390ccdadd7f26ed4cd1f15db5457b44166874 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Thu, 20 Jul 2023 17:33:49 +0200 Subject: [PATCH] Added theme support for the 'manual' metadata type for the text element --- es-app/src/views/GamelistView.cpp | 2 ++ es-app/src/views/SystemView.cpp | 2 ++ es-core/src/components/TextComponent.h | 8 ++++---- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/es-app/src/views/GamelistView.cpp b/es-app/src/views/GamelistView.cpp index c881a0262..7a06df93b 100644 --- a/es-app/src/views/GamelistView.cpp +++ b/es-app/src/views/GamelistView.cpp @@ -849,6 +849,8 @@ void GamelistView::updateView(const CursorState& state) return file->metadata.get("kidgame") == "true" ? "yes" : "no"; else if (metadata == "broken") return file->metadata.get("broken") == "true" ? "yes" : "no"; + else if (metadata == "manual") + return file->getManualPath() != "" ? "yes" : "no"; else if (metadata == "playcount") return file->metadata.get("playcount"); else if (metadata == "altemulator") diff --git a/es-app/src/views/SystemView.cpp b/es-app/src/views/SystemView.cpp index 5f6e66998..0ca4cbd76 100644 --- a/es-app/src/views/SystemView.cpp +++ b/es-app/src/views/SystemView.cpp @@ -1345,6 +1345,8 @@ void SystemView::updateGameSelectors() else if (metadata == "broken") text->setValue( games.at(gameSelectorEntry)->metadata.get("broken") == "true" ? "yes" : "no"); + else if (metadata == "manual") + text->setValue(games.at(gameSelectorEntry)->getManualPath() != "" ? "yes" : "no"); else if (metadata == "playcount") text->setValue(games.at(gameSelectorEntry)->metadata.get("playcount")); else if (metadata == "altemulator") diff --git a/es-core/src/components/TextComponent.h b/es-core/src/components/TextComponent.h index 96d8834c8..39110b439 100644 --- a/es-core/src/components/TextComponent.h +++ b/es-core/src/components/TextComponent.h @@ -105,10 +105,10 @@ private: "gamecountFavoritesNoText"}; static inline std::vector supportedMetadataTypes { - "name", "description", "rating", "developer", "publisher", - "genre", "players", "favorite", "completed", "kidgame", - "broken", "playcount", "controller", "altemulator", "emulator", - "systemName", "systemFullname", "sourceSystemName", "sourceSystemFullname"}; + "name", "description", "rating", "developer", "publisher", + "genre", "players", "favorite", "completed", "kidgame", + "broken", "playcount", "controller", "altemulator", "emulator", + "manual", "systemName", "systemFullname", "sourceSystemName", "sourceSystemFullname"}; Renderer* mRenderer; std::string mDefaultValue;