Added function to unpause video.

This commit is contained in:
Leon Styhre 2020-09-26 22:15:36 +02:00
parent 304526e4c6
commit 08a2602fe2
4 changed files with 15 additions and 0 deletions

View file

@ -522,6 +522,12 @@ void GuiComponent::onPauseVideo()
getChild(i)->onPauseVideo();
}
void GuiComponent::onUnpauseVideo()
{
for (unsigned int i = 0; i < getChildCount(); i++)
getChild(i)->onUnpauseVideo();
}
void GuiComponent::onScreenSaverActivate()
{
for (unsigned int i = 0; i < getChildCount(); i++)

View file

@ -167,6 +167,7 @@ public:
virtual void onShow();
virtual void onHide();
virtual void onPauseVideo();
virtual void onUnpauseVideo();
virtual void setRenderView(bool status) { mRenderView = status; }
virtual bool getRenderView() { return mRenderView; };

View file

@ -358,6 +358,13 @@ void VideoComponent::onPauseVideo()
manageState();
}
void VideoComponent::onUnpauseVideo()
{
mBlockPlayer = false;
mPause = false;
manageState();
}
void VideoComponent::onScreenSaverActivate()
{
mBlockPlayer = true;

View file

@ -48,6 +48,7 @@ public:
virtual void onShow() override;
virtual void onHide() override;
virtual void onPauseVideo() override;
virtual void onUnpauseVideo() override;
virtual void onScreenSaverActivate() override;
virtual void onScreenSaverDeactivate() override;
virtual void onGameLaunchedActivate() override;