mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-26 08:05:38 +00:00
Fixed an issue where a default primary component was not set in GamelistView.
This commit is contained in:
parent
db72d41ef0
commit
b96f6bc131
|
@ -245,24 +245,25 @@ void GamelistView::onThemeChanged(const std::shared_ptr<ThemeData>& theme)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mPrimary == nullptr) {
|
|
||||||
mTextList = std::make_unique<TextListComponent<FileData*>>();
|
|
||||||
mPrimary = mTextList.get();
|
|
||||||
mPrimary->setPosition(0.2f, mSize.y * 0.2f);
|
|
||||||
mPrimary->setSize(mSize.x * 0.7f, mSize.y * 0.6f);
|
|
||||||
mPrimary->setAlignment(TextListComponent<FileData*>::PrimaryAlignment::ALIGN_LEFT);
|
|
||||||
mPrimary->setCursorChangedCallback(
|
|
||||||
[&](const CursorState& state) { updateInfoPanel(state); });
|
|
||||||
mPrimary->setDefaultZIndex(50.0f);
|
|
||||||
mPrimary->setZIndex(50.0f);
|
|
||||||
mPrimary->applyTheme(theme, "gamelist", "", ALL);
|
|
||||||
addChild(mPrimary);
|
|
||||||
}
|
|
||||||
|
|
||||||
mHelpStyle.applyTheme(mTheme, "gamelist");
|
mHelpStyle.applyTheme(mTheme, "gamelist");
|
||||||
populateList(mRoot->getChildrenListToDisplay(), mRoot);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mPrimary == nullptr) {
|
||||||
|
mTextList = std::make_unique<TextListComponent<FileData*>>();
|
||||||
|
mPrimary = mTextList.get();
|
||||||
|
mPrimary->setPosition(0.2f, mSize.y * 0.2f);
|
||||||
|
mPrimary->setSize(mSize.x * 0.7f, mSize.y * 0.6f);
|
||||||
|
mPrimary->setAlignment(TextListComponent<FileData*>::PrimaryAlignment::ALIGN_LEFT);
|
||||||
|
mPrimary->setCursorChangedCallback(
|
||||||
|
[&](const CursorState& state) { updateInfoPanel(state); });
|
||||||
|
mPrimary->setDefaultZIndex(50.0f);
|
||||||
|
mPrimary->setZIndex(50.0f);
|
||||||
|
mPrimary->applyTheme(theme, "gamelist", "", ALL);
|
||||||
|
addChild(mPrimary);
|
||||||
|
}
|
||||||
|
|
||||||
|
populateList(mRoot->getChildrenListToDisplay(), mRoot);
|
||||||
|
|
||||||
// Disable quick system select if the primary component uses the left and right buttons.
|
// Disable quick system select if the primary component uses the left and right buttons.
|
||||||
if (mCarousel != nullptr) {
|
if (mCarousel != nullptr) {
|
||||||
if (mCarousel->getType() == CarouselComponent<FileData*>::CarouselType::HORIZONTAL ||
|
if (mCarousel->getType() == CarouselComponent<FileData*>::CarouselType::HORIZONTAL ||
|
||||||
|
|
Loading…
Reference in a new issue