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";
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")

View file

@ -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")

View file

@ -108,7 +108,7 @@ private:
"name", "description", "rating", "developer", "publisher",
"genre", "players", "favorite", "completed", "kidgame",
"broken", "playcount", "controller", "altemulator", "emulator",
"systemName", "systemFullname", "sourceSystemName", "sourceSystemFullname"};
"manual", "systemName", "systemFullname", "sourceSystemName", "sourceSystemFullname"};
Renderer* mRenderer;
std::string mDefaultValue;