1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-01 23:12:49 +02:00

intro rework

This commit is contained in:
Laserlicht
2024-09-12 22:28:45 +02:00
parent 75f8614f26
commit 822fa61bf2
14 changed files with 79 additions and 68 deletions

View File

@@ -28,7 +28,7 @@ VideoWidgetBase::~VideoWidgetBase() = default;
void VideoWidgetBase::playVideo(const VideoPath & fileToPlay)
{
videoInstance = CCS->videoh->open(fileToPlay, false);
videoInstance = CCS->videoh->open(fileToPlay, Point(0, 0));
if (videoInstance)
{
pos.w = videoInstance->size().x;
@@ -119,6 +119,11 @@ void VideoWidgetBase::tick(uint32_t msPassed)
}
}
Point VideoWidgetBase::size()
{
return videoInstance->size();
}
VideoWidget::VideoWidget(const Point & position, const VideoPath & prologue, const VideoPath & looped, bool playAudio)
: VideoWidgetBase(position, prologue, playAudio)
, loopedVideo(looped)