mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-04-10 19:15:13 +00:00
Fixed an issue where the CarouselComponent text property value was ignored.
This commit is contained in:
parent
304d304727
commit
949f059b7e
|
@ -449,7 +449,7 @@ void SystemView::populate()
|
||||||
if (SystemData::sSystemVector.size() == 0)
|
if (SystemData::sSystemVector.size() == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
LOG(LogDebug) << "SystemView::populate(): Populating carousel";
|
LOG(LogDebug) << "SystemView::populate(): Populating primary element...";
|
||||||
|
|
||||||
auto themeSets = ThemeData::getThemeSets();
|
auto themeSets = ThemeData::getThemeSets();
|
||||||
std::map<std::string, ThemeData::ThemeSet, ThemeData::StringComparator>::const_iterator
|
std::map<std::string, ThemeData::ThemeSet, ThemeData::StringComparator>::const_iterator
|
||||||
|
@ -467,6 +467,7 @@ void SystemView::populate()
|
||||||
const std::shared_ptr<ThemeData>& theme {it->getTheme()};
|
const std::shared_ptr<ThemeData>& theme {it->getTheme()};
|
||||||
std::string itemPath;
|
std::string itemPath;
|
||||||
std::string defaultItemPath;
|
std::string defaultItemPath;
|
||||||
|
std::string itemText;
|
||||||
|
|
||||||
if (mLegacyMode && mViewNeedsReload) {
|
if (mLegacyMode && mViewNeedsReload) {
|
||||||
if (mCarousel == nullptr) {
|
if (mCarousel == nullptr) {
|
||||||
|
@ -577,6 +578,8 @@ void SystemView::populate()
|
||||||
itemPath = element.second.get<std::string>("staticItem");
|
itemPath = element.second.get<std::string>("staticItem");
|
||||||
if (element.second.has("defaultItem"))
|
if (element.second.has("defaultItem"))
|
||||||
defaultItemPath = element.second.get<std::string>("defaultItem");
|
defaultItemPath = element.second.get<std::string>("defaultItem");
|
||||||
|
if (element.second.has("text"))
|
||||||
|
itemText = element.second.get<std::string>("text");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (element.second.type == "image") {
|
else if (element.second.type == "image") {
|
||||||
|
@ -738,12 +741,17 @@ void SystemView::populate()
|
||||||
|
|
||||||
if (mCarousel != nullptr) {
|
if (mCarousel != nullptr) {
|
||||||
CarouselComponent<SystemData*>::Entry entry;
|
CarouselComponent<SystemData*>::Entry entry;
|
||||||
|
if (mLegacyMode) {
|
||||||
// Keep showing only the short name for legacy themes to maintain maximum
|
// Keep showing only the short name for legacy themes to maintain maximum
|
||||||
// backward compatibility. This also applies to unreadable theme sets.
|
// backward compatibility. This also applies to unreadable theme sets.
|
||||||
if (mLegacyMode)
|
|
||||||
entry.name = it->getName();
|
entry.name = it->getName();
|
||||||
else
|
}
|
||||||
|
else {
|
||||||
|
if (itemText == "")
|
||||||
entry.name = it->getFullName();
|
entry.name = it->getFullName();
|
||||||
|
else
|
||||||
|
entry.name = itemText;
|
||||||
|
}
|
||||||
letterCaseFunc(entry.name);
|
letterCaseFunc(entry.name);
|
||||||
entry.object = it;
|
entry.object = it;
|
||||||
entry.data.itemPath = itemPath;
|
entry.data.itemPath = itemPath;
|
||||||
|
@ -752,7 +760,10 @@ void SystemView::populate()
|
||||||
}
|
}
|
||||||
else if (mGrid != nullptr) {
|
else if (mGrid != nullptr) {
|
||||||
GridComponent<SystemData*>::Entry entry;
|
GridComponent<SystemData*>::Entry entry;
|
||||||
|
if (itemText == "")
|
||||||
entry.name = it->getFullName();
|
entry.name = it->getFullName();
|
||||||
|
else
|
||||||
|
entry.name = itemText;
|
||||||
letterCaseFunc(entry.name);
|
letterCaseFunc(entry.name);
|
||||||
entry.object = it;
|
entry.object = it;
|
||||||
entry.data.itemPath = itemPath;
|
entry.data.itemPath = itemPath;
|
||||||
|
|
Loading…
Reference in a new issue