1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 02:49:55 +00:00
openmw-tes3mp/apps/openmw/mwgui/videowidget.cpp
scrawl e0d6670ac4 Move video skip detection to WindowManager
Fixes a bug where skipping using Esc would not work if a mouse button had been pressed previously
2014-06-10 01:57:54 +02:00

39 lines
532 B
C++

#include "videowidget.hpp"
namespace MWGui
{
VideoWidget::VideoWidget()
{
setNeedKeyFocus(true);
}
void VideoWidget::playVideo(const std::string &video)
{
mPlayer.playVideo(video);
setImageTexture(mPlayer.getTextureName());
}
int VideoWidget::getVideoWidth()
{
return mPlayer.getVideoWidth();
}
int VideoWidget::getVideoHeight()
{
return mPlayer.getVideoHeight();
}
bool VideoWidget::update()
{
mPlayer.update();
return mPlayer.isPlaying();
}
void VideoWidget::stop()
{
mPlayer.close();
}
}