mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 20:19:57 +00:00
e0d6670ac4
Fixes a bug where skipping using Esc would not work if a mouse button had been pressed previously
38 lines
693 B
C++
38 lines
693 B
C++
#ifndef OPENMW_MWGUI_VIDEOWIDGET_H
|
|
#define OPENMW_MWGUI_VIDEOWIDGET_H
|
|
|
|
#include <MyGUI_ImageBox.h>
|
|
|
|
#include "../mwrender/videoplayer.hpp"
|
|
|
|
namespace MWGui
|
|
{
|
|
|
|
/**
|
|
* Widget that plays a video.
|
|
*/
|
|
class VideoWidget : public MyGUI::ImageBox
|
|
{
|
|
public:
|
|
MYGUI_RTTI_DERIVED(VideoWidget)
|
|
|
|
VideoWidget();
|
|
|
|
void playVideo (const std::string& video);
|
|
|
|
int getVideoWidth();
|
|
int getVideoHeight();
|
|
|
|
/// @return Is the video still playing?
|
|
bool update();
|
|
|
|
/// Stop video and free resources (done automatically on destruction)
|
|
void stop();
|
|
|
|
private:
|
|
MWRender::VideoPlayer mPlayer;
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|