You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openmw-tes3mp/apps/openmw/mwgui/videowidget.cpp

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