mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-02 22:45:33 +00:00
Esc cancels the video
This commit is contained in:
parent
0ce5ade6d8
commit
faad64b254
6 changed files with 15 additions and 0 deletions
|
@ -306,6 +306,7 @@ namespace MWBase
|
|||
|
||||
/// \todo this does not belong here
|
||||
virtual void playVideo(const std::string& name) = 0;
|
||||
virtual void stopVideo() = 0;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -931,4 +931,9 @@ void RenderingManager::playVideo(const std::string& name)
|
|||
mVideoPlayer->playVideo ("video/" + name);
|
||||
}
|
||||
|
||||
void RenderingManager::stopVideo()
|
||||
{
|
||||
mVideoPlayer->close ();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -1291,4 +1291,9 @@ namespace MWWorld
|
|||
{
|
||||
mRendering->playVideo(name);
|
||||
}
|
||||
|
||||
void World::stopVideo ()
|
||||
{
|
||||
mRendering->stopVideo();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -335,6 +335,7 @@ namespace MWWorld
|
|||
|
||||
/// \todo this does not belong here
|
||||
virtual void playVideo(const std::string& name);
|
||||
virtual void stopVideo();
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue