mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
Added theme support for the 'physicalName' and 'physicalNameExtension' metadata types for the text element
This commit is contained in:
parent
35356d96ad
commit
61d2b92814
|
@ -914,6 +914,12 @@ void GamelistView::updateView(const CursorState& state)
|
|||
->getSystemEnvData()
|
||||
->mLaunchCommands.front()
|
||||
.second));
|
||||
else if (metadata == "physicalName")
|
||||
return file->getType() == PLACEHOLDER ?
|
||||
"" :
|
||||
Utils::FileSystem::getStem(file->getFileName());
|
||||
else if (metadata == "physicalNameExtension")
|
||||
return file->getType() == PLACEHOLDER ? "" : file->getFileName();
|
||||
else if (metadata == "systemName")
|
||||
return file->getSystem()->getName();
|
||||
else if (metadata == "systemFullname")
|
||||
|
|
|
@ -1277,6 +1277,11 @@ void SystemView::updateGameSelectors()
|
|||
->getSystemEnvData()
|
||||
->mLaunchCommands.front()
|
||||
.second));
|
||||
else if (metadata == "physicalName")
|
||||
text->setValue(
|
||||
Utils::FileSystem::getStem(games.at(gameSelectorEntry)->getFileName()));
|
||||
else if (metadata == "physicalNameExtension")
|
||||
text->setValue(games.at(gameSelectorEntry)->getFileName());
|
||||
else if (metadata == "systemName")
|
||||
text->setValue(games.at(gameSelectorEntry)->getSystem()->getName());
|
||||
else if (metadata == "systemFullname")
|
||||
|
|
|
@ -126,11 +126,28 @@ private:
|
|||
"gamecountFavorites",
|
||||
"gamecountFavoritesNoText"};
|
||||
|
||||
static inline std::vector<std::string> supportedMetadataTypes {
|
||||
"name", "description", "rating", "developer", "publisher",
|
||||
"genre", "players", "favorite", "completed", "kidgame",
|
||||
"broken", "playcount", "controller", "altemulator", "emulator",
|
||||
"manual", "systemName", "systemFullname", "sourceSystemName", "sourceSystemFullname"};
|
||||
static inline std::vector<std::string> supportedMetadataTypes {"name",
|
||||
"description",
|
||||
"rating",
|
||||
"developer",
|
||||
"publisher",
|
||||
"genre",
|
||||
"players",
|
||||
"favorite",
|
||||
"completed",
|
||||
"kidgame",
|
||||
"broken",
|
||||
"playcount",
|
||||
"controller",
|
||||
"altemulator",
|
||||
"emulator",
|
||||
"manual",
|
||||
"physicalName",
|
||||
"physicalNameExtension",
|
||||
"systemName",
|
||||
"systemFullname",
|
||||
"sourceSystemName",
|
||||
"sourceSystemFullname"};
|
||||
|
||||
Renderer* mRenderer;
|
||||
std::string mDefaultValue;
|
||||
|
|
Loading…
Reference in a new issue