mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Fixed video widget playback
This commit is contained in:
@@ -95,7 +95,7 @@ CMenuScreen::CMenuScreen(const JsonNode & configNode)
|
||||
if(!config["video"].isNull())
|
||||
{
|
||||
Point videoPosition(config["video"]["x"].Integer(), config["video"]["y"].Integer());
|
||||
videoPlayer = std::make_shared<VideoWidget>(videoPosition, VideoPath::fromJson(config["video"]["name"]));
|
||||
videoPlayer = std::make_shared<VideoWidget>(videoPosition, VideoPath::fromJson(config["video"]["name"]), false);
|
||||
}
|
||||
else
|
||||
tabs->setRedrawParent(true);
|
||||
@@ -110,6 +110,12 @@ std::shared_ptr<CIntObject> CMenuScreen::createTab(size_t index)
|
||||
return std::make_shared<CMenuEntry>(this, config["items"].Vector()[index]);
|
||||
}
|
||||
|
||||
void CMenuScreen::show(Canvas & to)
|
||||
{
|
||||
// TODO: avoid excessive redraws
|
||||
CIntObject::showAll(to);
|
||||
}
|
||||
|
||||
void CMenuScreen::activate()
|
||||
{
|
||||
CCS->musich->playMusic(AudioPath::builtin("Music/MainMenu"), true, true);
|
||||
|
||||
Reference in New Issue
Block a user