1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-02 23:15:32 +00:00

Esc cancels the video

This commit is contained in:
scrawl 2012-12-12 01:13:53 +01:00
parent 0ce5ade6d8
commit faad64b254
6 changed files with 15 additions and 0 deletions

View file

@ -306,6 +306,7 @@ namespace MWBase
/// \todo this does not belong here
virtual void playVideo(const std::string& name) = 0;
virtual void stopVideo() = 0;
};
}

View file

@ -508,6 +508,8 @@ namespace MWInput
{
if (mWindows.isGuiMode () && (mWindows.getMode () == MWGui::GM_MainMenu || mWindows.getMode () == MWGui::GM_Settings))
mWindows.popGuiMode();
else if (mWindows.isGuiMode () && mWindows.getMode () == MWGui::GM_Video)
MWBase::Environment::get().getWorld ()->stopVideo ();
else
mWindows.pushGuiMode (MWGui::GM_MainMenu);
}

View file

@ -931,4 +931,9 @@ void RenderingManager::playVideo(const std::string& name)
mVideoPlayer->playVideo ("video/" + name);
}
void RenderingManager::stopVideo()
{
mVideoPlayer->close ();
}
} // namespace

View file

@ -197,6 +197,7 @@ class RenderingManager: private RenderingInterface, public Ogre::WindowEventList
void setupExternalRendering (MWRender::ExternalRendering& rendering);
void playVideo(const std::string& name);
void stopVideo();
protected:
virtual void windowResized(Ogre::RenderWindow* rw);

View file

@ -1291,4 +1291,9 @@ namespace MWWorld
{
mRendering->playVideo(name);
}
void World::stopVideo ()
{
mRendering->stopVideo();
}
}

View file

@ -335,6 +335,7 @@ namespace MWWorld
/// \todo this does not belong here
virtual void playVideo(const std::string& name);
virtual void stopVideo();
};
}