mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-03 17:37:18 +00:00
e0d6670ac4
Fixes a bug where skipping using Esc would not work if a mouse button had been pressed previously
40 lines
532 B
C++
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();
|
|
}
|
|
|
|
}
|