mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 23:55:38 +00:00
Fixed an issue where VideoComponent static images were not fading out correctly in the gamelist view.
This commit is contained in:
parent
03f8e020c3
commit
027af497d5
|
@ -205,10 +205,17 @@ void GamelistView::update(int deltaTime)
|
|||
}
|
||||
|
||||
for (auto& video : mVideoComponents) {
|
||||
if (!mVideoPlaying)
|
||||
video->onHide();
|
||||
else if (mVideoPlaying && !video->isVideoPaused() && !mWindow->isScreensaverActive())
|
||||
if (!mVideoPlaying) {
|
||||
if (!video->getScrollHide())
|
||||
video->onHide();
|
||||
else if (!video->hasStaticImage())
|
||||
video->onHide();
|
||||
else if (video->getOpacity() == 0)
|
||||
video->onHide();
|
||||
}
|
||||
else if (mVideoPlaying && !video->isVideoPaused() && !mWindow->isScreensaverActive()) {
|
||||
video->onShow();
|
||||
}
|
||||
|
||||
if (ViewController::getInstance()->getGameLaunchTriggered() && video->isAnimationPlaying(0))
|
||||
video->finishAnimation(0);
|
||||
|
@ -733,6 +740,10 @@ void GamelistView::updateInfoPanel()
|
|||
if (image->getScrollHide())
|
||||
comps.emplace_back(image.get());
|
||||
}
|
||||
for (auto& video : mVideoComponents) {
|
||||
if (video->getScrollHide())
|
||||
comps.emplace_back(video.get());
|
||||
}
|
||||
for (auto& badge : mBadgeComponents) {
|
||||
if (badge->getScrollHide())
|
||||
comps.emplace_back(badge.get());
|
||||
|
|
|
@ -49,6 +49,7 @@ public:
|
|||
void setOpacity(unsigned char opacity) override { mOpacity = opacity; }
|
||||
|
||||
bool hasStaticVideo() { return !mConfig.staticVideoPath.empty(); }
|
||||
bool hasStaticImage() { return mStaticImage.getTextureSize() != glm::ivec2 {0, 0}; }
|
||||
|
||||
void onShow() override;
|
||||
void onHide() override;
|
||||
|
|
Loading…
Reference in a new issue