mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
Added support for using the systemNameSuffix property together with scrollable text containers
This commit is contained in:
parent
ac272bc944
commit
e00967acfa
|
@ -888,7 +888,25 @@ void GamelistView::updateView(const CursorState& state)
|
|||
continue;
|
||||
}
|
||||
|
||||
text->setValue(getMetadataValue());
|
||||
if (metadata == "name" && file->getSystem()->isCollection() &&
|
||||
text->getSystemNameSuffix()) {
|
||||
const LetterCase letterCase {text->getLetterCaseSystemNameSuffix()};
|
||||
std::string suffix {" ["};
|
||||
if (letterCase == LetterCase::UPPERCASE)
|
||||
suffix.append(
|
||||
Utils::String::toUpper(file->getSourceFileData()->getSystem()->getName()));
|
||||
else if (letterCase == LetterCase::CAPITALIZE)
|
||||
suffix.append(Utils::String::toCapitalized(
|
||||
file->getSourceFileData()->getSystem()->getName()));
|
||||
else
|
||||
suffix.append(file->getSourceFileData()->getSystem()->getName());
|
||||
suffix.append("]");
|
||||
|
||||
text->setValue(getMetadataValue() + suffix);
|
||||
}
|
||||
else {
|
||||
text->setValue(getMetadataValue());
|
||||
}
|
||||
}
|
||||
|
||||
for (auto& text : mTextComponents) {
|
||||
|
|
Loading…
Reference in a new issue