1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-03 17:37:18 +00:00
OpenMW/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

40 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();
}
}