mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 14:15: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()
|
->getSystemEnvData()
|
||||||
->mLaunchCommands.front()
|
->mLaunchCommands.front()
|
||||||
.second));
|
.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")
|
else if (metadata == "systemName")
|
||||||
return file->getSystem()->getName();
|
return file->getSystem()->getName();
|
||||||
else if (metadata == "systemFullname")
|
else if (metadata == "systemFullname")
|
||||||
|
|
|
@ -1277,6 +1277,11 @@ void SystemView::updateGameSelectors()
|
||||||
->getSystemEnvData()
|
->getSystemEnvData()
|
||||||
->mLaunchCommands.front()
|
->mLaunchCommands.front()
|
||||||
.second));
|
.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")
|
else if (metadata == "systemName")
|
||||||
text->setValue(games.at(gameSelectorEntry)->getSystem()->getName());
|
text->setValue(games.at(gameSelectorEntry)->getSystem()->getName());
|
||||||
else if (metadata == "systemFullname")
|
else if (metadata == "systemFullname")
|
||||||
|
|
|
@ -126,11 +126,28 @@ private:
|
||||||
"gamecountFavorites",
|
"gamecountFavorites",
|
||||||
"gamecountFavoritesNoText"};
|
"gamecountFavoritesNoText"};
|
||||||
|
|
||||||
static inline std::vector<std::string> supportedMetadataTypes {
|
static inline std::vector<std::string> supportedMetadataTypes {"name",
|
||||||
"name", "description", "rating", "developer", "publisher",
|
"description",
|
||||||
"genre", "players", "favorite", "completed", "kidgame",
|
"rating",
|
||||||
"broken", "playcount", "controller", "altemulator", "emulator",
|
"developer",
|
||||||
"manual", "systemName", "systemFullname", "sourceSystemName", "sourceSystemFullname"};
|
"publisher",
|
||||||
|
"genre",
|
||||||
|
"players",
|
||||||
|
"favorite",
|
||||||
|
"completed",
|
||||||
|
"kidgame",
|
||||||
|
"broken",
|
||||||
|
"playcount",
|
||||||
|
"controller",
|
||||||
|
"altemulator",
|
||||||
|
"emulator",
|
||||||
|
"manual",
|
||||||
|
"physicalName",
|
||||||
|
"physicalNameExtension",
|
||||||
|
"systemName",
|
||||||
|
"systemFullname",
|
||||||
|
"sourceSystemName",
|
||||||
|
"sourceSystemFullname"};
|
||||||
|
|
||||||
Renderer* mRenderer;
|
Renderer* mRenderer;
|
||||||
std::string mDefaultValue;
|
std::string mDefaultValue;
|
||||||
|
|
Loading…
Reference in a new issue