mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 17:19:56 +00:00
40 lines
767 B
C++
40 lines
767 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. Can be skipped by pressing Esc.
|
||
|
*/
|
||
|
class VideoWidget : public MyGUI::ImageBox
|
||
|
{
|
||
|
public:
|
||
|
MYGUI_RTTI_DERIVED(VideoWidget)
|
||
|
|
||
|
VideoWidget();
|
||
|
|
||
|
void playVideo (const std::string& video, bool allowSkipping);
|
||
|
|
||
|
int getVideoWidth();
|
||
|
int getVideoHeight();
|
||
|
|
||
|
/// @return Is the video still playing?
|
||
|
bool update();
|
||
|
|
||
|
private:
|
||
|
bool mAllowSkipping;
|
||
|
|
||
|
MWRender::VideoPlayer mPlayer;
|
||
|
|
||
|
void onKeyPressed(MyGUI::Widget *_sender, MyGUI::KeyCode _key, MyGUI::Char _char);
|
||
|
};
|
||
|
|
||
|
}
|
||
|
|
||
|
#endif
|