mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
Renamed the functions updateInfoPanel and legacyUpdateInfoPanel to updateView and legacyUpdateView in GamelistView.
This commit is contained in:
parent
fa81853127
commit
7718e97d29
|
@ -94,8 +94,7 @@ void GamelistView::legacyPopulateFields()
|
|||
mPrimary->setPosition(mSize.x * (0.50f + padding), mPrimary->getPosition().y);
|
||||
mPrimary->setSize(mSize.x * (0.50f - padding), mPrimary->getSize().y);
|
||||
mPrimary->setAlignment(TextListComponent<FileData*>::PrimaryAlignment::ALIGN_LEFT);
|
||||
mPrimary->setCursorChangedCallback(
|
||||
[&](const CursorState& state) { legacyUpdateInfoPanel(state); });
|
||||
mPrimary->setCursorChangedCallback([&](const CursorState& state) { legacyUpdateView(state); });
|
||||
|
||||
// Metadata labels + values.
|
||||
mTextComponents.push_back(std::make_unique<TextComponent>());
|
||||
|
@ -338,7 +337,7 @@ void GamelistView::legacyOnThemeChanged(const std::shared_ptr<ThemeData>& theme)
|
|||
mHelpStyle.applyTheme(mTheme, getName());
|
||||
}
|
||||
|
||||
void GamelistView::legacyUpdateInfoPanel(const CursorState& state)
|
||||
void GamelistView::legacyUpdateView(const CursorState& state)
|
||||
{
|
||||
FileData* file {(mPrimary->size() > 0 && state == CursorState::CURSOR_STOPPED) ?
|
||||
mPrimary->getSelected() :
|
||||
|
|
|
@ -74,9 +74,9 @@ void GamelistView::onShow()
|
|||
GuiComponent::onShow();
|
||||
|
||||
if (mLegacyMode)
|
||||
legacyUpdateInfoPanel(CursorState::CURSOR_STOPPED);
|
||||
legacyUpdateView(CursorState::CURSOR_STOPPED);
|
||||
else
|
||||
updateInfoPanel(CursorState::CURSOR_STOPPED);
|
||||
updateView(CursorState::CURSOR_STOPPED);
|
||||
|
||||
mPrimary->finishAnimation(0);
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ void GamelistView::onThemeChanged(const std::shared_ptr<ThemeData>& theme)
|
|||
mPrimary->setSize(mSize.x, mSize.y * 0.8f);
|
||||
mPrimary->setAlignment(TextListComponent<FileData*>::PrimaryAlignment::ALIGN_LEFT);
|
||||
mPrimary->setCursorChangedCallback(
|
||||
[&](const CursorState& state) { updateInfoPanel(state); });
|
||||
[&](const CursorState& state) { updateView(state); });
|
||||
mPrimary->setDefaultZIndex(50.0f);
|
||||
mPrimary->setZIndex(50.0f);
|
||||
mPrimary->applyTheme(theme, "gamelist", element.first, ALL);
|
||||
|
@ -163,7 +163,7 @@ void GamelistView::onThemeChanged(const std::shared_ptr<ThemeData>& theme)
|
|||
mPrimary = mCarousel.get();
|
||||
}
|
||||
mPrimary->setCursorChangedCallback(
|
||||
[&](const CursorState& state) { updateInfoPanel(state); });
|
||||
[&](const CursorState& state) { updateView(state); });
|
||||
mPrimary->setDefaultZIndex(50.0f);
|
||||
mPrimary->applyTheme(theme, "gamelist", element.first, ALL);
|
||||
addChild(mPrimary);
|
||||
|
@ -303,8 +303,7 @@ void GamelistView::onThemeChanged(const std::shared_ptr<ThemeData>& theme)
|
|||
mPrimary->setPosition(0.0f, mSize.y * 0.1f);
|
||||
mPrimary->setSize(mSize.x, mSize.y * 0.8f);
|
||||
mPrimary->setAlignment(TextListComponent<FileData*>::PrimaryAlignment::ALIGN_LEFT);
|
||||
mPrimary->setCursorChangedCallback(
|
||||
[&](const CursorState& state) { updateInfoPanel(state); });
|
||||
mPrimary->setCursorChangedCallback([&](const CursorState& state) { updateView(state); });
|
||||
mPrimary->setDefaultZIndex(50.0f);
|
||||
mPrimary->setZIndex(50.0f);
|
||||
mPrimary->applyTheme(theme, "gamelist", "", ALL);
|
||||
|
@ -420,10 +419,10 @@ std::vector<HelpPrompt> GamelistView::getHelpPrompts()
|
|||
return prompts;
|
||||
}
|
||||
|
||||
void GamelistView::updateInfoPanel(const CursorState& state)
|
||||
void GamelistView::updateView(const CursorState& state)
|
||||
{
|
||||
if (mLegacyMode) {
|
||||
legacyUpdateInfoPanel(state);
|
||||
legacyUpdateView(state);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ public:
|
|||
void onShow() override;
|
||||
void onTransition() override;
|
||||
|
||||
void preloadGamelist() { updateInfoPanel(CursorState::CURSOR_STOPPED); }
|
||||
void preloadGamelist() { updateView(CursorState::CURSOR_STOPPED); }
|
||||
void launch(FileData* game) override { ViewController::getInstance()->triggerGameLaunch(game); }
|
||||
|
||||
std::string getName() const
|
||||
|
@ -96,13 +96,13 @@ public:
|
|||
std::vector<HelpPrompt> getHelpPrompts() override;
|
||||
|
||||
private:
|
||||
void updateInfoPanel(const CursorState& state);
|
||||
void updateView(const CursorState& state);
|
||||
void setGameImage(FileData* file, GuiComponent* comp);
|
||||
|
||||
// Legacy (backward compatibility) functions.
|
||||
void legacyPopulateFields();
|
||||
void legacyOnThemeChanged(const std::shared_ptr<ThemeData>& theme);
|
||||
void legacyUpdateInfoPanel(const CursorState& state);
|
||||
void legacyUpdateView(const CursorState& state);
|
||||
void legacyUpdate(int deltaTime);
|
||||
void legacyInitMDLabels();
|
||||
void legacyInitMDValues();
|
||||
|
|
Loading…
Reference in a new issue