mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-10-27 06:16:04 +03:00
45 lines
1.2 KiB
C++
45 lines
1.2 KiB
C++
#ifndef UI_C_SIMPLE_MOVIE_FRAME_HPP
|
|
#define UI_C_SIMPLE_MOVIE_FRAME_HPP
|
|
|
|
#include "ui/CSimpleFrame.hpp"
|
|
#include <tempest/Vector.hpp>
|
|
|
|
class CRect;
|
|
class CRenderBatch;
|
|
|
|
class CSimpleMovieFrame : public CSimpleFrame {
|
|
public:
|
|
// Static variables
|
|
static int32_t s_metatable;
|
|
static int32_t s_objectType;
|
|
|
|
// Static functions
|
|
static void CreateScriptMetaTable();
|
|
static int32_t GetObjectType();
|
|
static void RegisterScriptMethods(lua_State* L);
|
|
|
|
// Member variables
|
|
int32_t m_isPlaying = 0;
|
|
int32_t m_enableSubtitles = 0;
|
|
char m_filename[256];
|
|
int32_t m_volume = 100;
|
|
ScriptIx m_onMovieFinished;
|
|
ScriptIx m_onMovieShowSubtitle;
|
|
ScriptIx m_onMovieHideSubtitle;
|
|
|
|
// Virtual member functions
|
|
virtual ScriptIx* GetScriptByName(const char* name, ScriptData& data);
|
|
virtual bool IsA(int32_t type);
|
|
virtual int32_t GetScriptMetaTable();
|
|
virtual void OnFrameRender(CRenderBatch* batch, uint32_t layer);
|
|
|
|
// Member functions
|
|
CSimpleMovieFrame(CSimpleFrame* parent);
|
|
int32_t StartMovie(const char* filename, int32_t volume);
|
|
void StopMovie();
|
|
int32_t ParseAVIFile(const char* filename);
|
|
int32_t OpenVideo();
|
|
};
|
|
|
|
#endif
|