mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-18 07:05:39 +00:00
commit
20da03973f
|
@ -235,6 +235,8 @@ void ViewController::launch(FileData* game, Vector3f center)
|
|||
game->launchGame(mWindow);
|
||||
setAnimation(new LambdaAnimation(fadeFunc, 800), 0, [this] { mLockInput = false; }, true);
|
||||
this->onFileChanged(game, FILE_METADATA_CHANGED);
|
||||
if (mCurrentView)
|
||||
mCurrentView->onShow();
|
||||
});
|
||||
} else if (transition_style == "slide"){
|
||||
// move camera to zoom in on center + fade out, launch game, come back in
|
||||
|
@ -244,6 +246,8 @@ void ViewController::launch(FileData* game, Vector3f center)
|
|||
mCamera = origCamera;
|
||||
setAnimation(new LaunchAnimation(mCamera, mFadeOpacity, center, 600), 0, [this] { mLockInput = false; }, true);
|
||||
this->onFileChanged(game, FILE_METADATA_CHANGED);
|
||||
if (mCurrentView)
|
||||
mCurrentView->onShow();
|
||||
});
|
||||
} else { // instant
|
||||
setAnimation(new LaunchAnimation(mCamera, mFadeOpacity, center, 10), 0, [this, origCamera, center, game]
|
||||
|
@ -252,6 +256,8 @@ void ViewController::launch(FileData* game, Vector3f center)
|
|||
mCamera = origCamera;
|
||||
setAnimation(new LaunchAnimation(mCamera, mFadeOpacity, center, 10), 0, [this] { mLockInput = false; }, true);
|
||||
this->onFileChanged(game, FILE_METADATA_CHANGED);
|
||||
if (mCurrentView)
|
||||
mCurrentView->onShow();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -115,6 +115,11 @@ GridGameListView::GridGameListView(Window* window, FileData* root) :
|
|||
updateInfoPanel();
|
||||
}
|
||||
|
||||
GridGameListView::~GridGameListView()
|
||||
{
|
||||
delete mVideo;
|
||||
}
|
||||
|
||||
FileData* GridGameListView::getCursor()
|
||||
{
|
||||
return mGrid.getSelected();
|
||||
|
@ -219,7 +224,10 @@ void GridGameListView::onThemeChanged(const std::shared_ptr<ThemeData>& theme)
|
|||
mDescription.setSize(mDescContainer.getSize().x(), 0);
|
||||
mDescription.applyTheme(theme, getName(), "md_description", ALL ^ (POSITION | ThemeFlags::SIZE | ThemeFlags::ORIGIN | TEXT | ROTATION));
|
||||
|
||||
// Repopulate list in case new theme is displaying a different image. Preserve selection.
|
||||
FileData* file = mGrid.getSelected();
|
||||
populateList(mRoot->getChildrenListToDisplay());
|
||||
mGrid.setCursor(file);
|
||||
|
||||
sortChildren();
|
||||
}
|
||||
|
@ -474,3 +482,15 @@ std::vector<HelpPrompt> GridGameListView::getHelpPrompts()
|
|||
}
|
||||
return prompts;
|
||||
}
|
||||
|
||||
void GridGameListView::update(int deltaTime)
|
||||
{
|
||||
ISimpleGameListView::update(deltaTime);
|
||||
mVideo->update(deltaTime);
|
||||
}
|
||||
|
||||
void GridGameListView::onShow()
|
||||
{
|
||||
GuiComponent::onShow();
|
||||
updateInfoPanel();
|
||||
}
|
||||
|
|
|
@ -13,6 +13,9 @@ class GridGameListView : public ISimpleGameListView
|
|||
{
|
||||
public:
|
||||
GridGameListView(Window* window, FileData* root);
|
||||
virtual ~GridGameListView();
|
||||
|
||||
virtual void onShow() override;
|
||||
|
||||
virtual void onThemeChanged(const std::shared_ptr<ThemeData>& theme) override;
|
||||
|
||||
|
@ -27,6 +30,7 @@ public:
|
|||
virtual void launch(FileData* game) override;
|
||||
|
||||
protected:
|
||||
virtual void update(int deltaTime) override;
|
||||
virtual std::string getQuickSystemSelectRightButton() override;
|
||||
virtual std::string getQuickSystemSelectLeftButton() override;
|
||||
virtual void populateList(const std::vector<FileData*>& files) override;
|
||||
|
|
Loading…
Reference in a new issue