diff --git a/es-app/src/views/GamelistLegacy.h b/es-app/src/views/GamelistLegacy.h index 90627210b..1c07f70d5 100644 --- a/es-app/src/views/GamelistLegacy.h +++ b/es-app/src/views/GamelistLegacy.h @@ -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::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()); @@ -338,7 +337,7 @@ void GamelistView::legacyOnThemeChanged(const std::shared_ptr& 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() : diff --git a/es-app/src/views/GamelistView.cpp b/es-app/src/views/GamelistView.cpp index 675a2b0c7..613052226 100644 --- a/es-app/src/views/GamelistView.cpp +++ b/es-app/src/views/GamelistView.cpp @@ -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& theme) mPrimary->setSize(mSize.x, mSize.y * 0.8f); mPrimary->setAlignment(TextListComponent::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& 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& theme) mPrimary->setPosition(0.0f, mSize.y * 0.1f); mPrimary->setSize(mSize.x, mSize.y * 0.8f); mPrimary->setAlignment(TextListComponent::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 GamelistView::getHelpPrompts() return prompts; } -void GamelistView::updateInfoPanel(const CursorState& state) +void GamelistView::updateView(const CursorState& state) { if (mLegacyMode) { - legacyUpdateInfoPanel(state); + legacyUpdateView(state); return; } diff --git a/es-app/src/views/GamelistView.h b/es-app/src/views/GamelistView.h index 7288b25b1..a9c1c6acd 100644 --- a/es-app/src/views/GamelistView.h +++ b/es-app/src/views/GamelistView.h @@ -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 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& theme); - void legacyUpdateInfoPanel(const CursorState& state); + void legacyUpdateView(const CursorState& state); void legacyUpdate(int deltaTime); void legacyInitMDLabels(); void legacyInitMDValues();