Added theme support for the 'manual' metadata type for the text element

This commit is contained in:
Leon Styhre 2023-07-20 17:33:49 +02:00
parent be2b761356
commit 07d390ccda
3 changed files with 8 additions and 4 deletions

View file

@ -849,6 +849,8 @@ void GamelistView::updateView(const CursorState& state)
return file->metadata.get("kidgame") == "true" ? "yes" : "no"; return file->metadata.get("kidgame") == "true" ? "yes" : "no";
else if (metadata == "broken") else if (metadata == "broken")
return file->metadata.get("broken") == "true" ? "yes" : "no"; return file->metadata.get("broken") == "true" ? "yes" : "no";
else if (metadata == "manual")
return file->getManualPath() != "" ? "yes" : "no";
else if (metadata == "playcount") else if (metadata == "playcount")
return file->metadata.get("playcount"); return file->metadata.get("playcount");
else if (metadata == "altemulator") else if (metadata == "altemulator")

View file

@ -1345,6 +1345,8 @@ void SystemView::updateGameSelectors()
else if (metadata == "broken") else if (metadata == "broken")
text->setValue( text->setValue(
games.at(gameSelectorEntry)->metadata.get("broken") == "true" ? "yes" : "no"); 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") else if (metadata == "playcount")
text->setValue(games.at(gameSelectorEntry)->metadata.get("playcount")); text->setValue(games.at(gameSelectorEntry)->metadata.get("playcount"));
else if (metadata == "altemulator") else if (metadata == "altemulator")

View file

@ -105,10 +105,10 @@ private:
"gamecountFavoritesNoText"}; "gamecountFavoritesNoText"};
static inline std::vector<std::string> supportedMetadataTypes { static inline std::vector<std::string> supportedMetadataTypes {
"name", "description", "rating", "developer", "publisher", "name", "description", "rating", "developer", "publisher",
"genre", "players", "favorite", "completed", "kidgame", "genre", "players", "favorite", "completed", "kidgame",
"broken", "playcount", "controller", "altemulator", "emulator", "broken", "playcount", "controller", "altemulator", "emulator",
"systemName", "systemFullname", "sourceSystemName", "sourceSystemFullname"}; "manual", "systemName", "systemFullname", "sourceSystemName", "sourceSystemFullname"};
Renderer* mRenderer; Renderer* mRenderer;
std::string mDefaultValue; std::string mDefaultValue;