diff --git a/client/lobby/CBonusSelection.cpp b/client/lobby/CBonusSelection.cpp index 33775dfa9..22a9106ef 100644 --- a/client/lobby/CBonusSelection.cpp +++ b/client/lobby/CBonusSelection.cpp @@ -72,6 +72,7 @@ CBonusSelection::CBonusSelection() buttonStart = std::make_shared(Point(475, 536), AnimationPath::builtin("CBBEGIB.DEF"), CButton::tooltip(), std::bind(&CBonusSelection::startMap, this), EShortcut::GLOBAL_ACCEPT); buttonRestart = std::make_shared(Point(475, 536), AnimationPath::builtin("CBRESTB.DEF"), CButton::tooltip(), std::bind(&CBonusSelection::restartMap, this), EShortcut::GLOBAL_ACCEPT); + buttonVideo = std::make_shared(Point(705, 214), AnimationPath::builtin("CBVIDEB.DEF"), CButton::tooltip(), [this](){ GH.windows().createAndPushWindow(getCampaign()->scenario(CSH->campaignMap).prolog, nullptr); }); buttonBack = std::make_shared(Point(624, 536), AnimationPath::builtin("CBCANCB.DEF"), CButton::tooltip(), std::bind(&CBonusSelection::goBack, this), EShortcut::GLOBAL_CANCEL); campaignName = std::make_shared(481, 28, FONT_BIG, ETextAlignment::TOPLEFT, Colors::YELLOW, CSH->si->getCampaignName()); @@ -309,6 +310,7 @@ void CBonusSelection::updateAfterStateChange() if(CSH->state != EClientState::GAMEPLAY) { buttonRestart->disable(); + buttonVideo->disable(); buttonStart->enable(); if(!getCampaign()->conqueredScenarios().empty()) buttonBack->block(true); @@ -319,6 +321,7 @@ void CBonusSelection::updateAfterStateChange() { buttonStart->disable(); buttonRestart->enable(); + buttonVideo->enable(); buttonBack->block(false); if(buttonDifficultyLeft) buttonDifficultyLeft->disable(); @@ -401,6 +404,7 @@ void CBonusSelection::startMap() //block buttons immediately buttonStart->block(true); buttonRestart->block(true); + buttonVideo->block(true); buttonBack->block(true); if(LOCPLINT) // we're currently ingame, so ask for starting new map and end game diff --git a/client/lobby/CBonusSelection.h b/client/lobby/CBonusSelection.h index 78289bb02..394c3b81b 100644 --- a/client/lobby/CBonusSelection.h +++ b/client/lobby/CBonusSelection.h @@ -65,6 +65,7 @@ public: std::shared_ptr buttonStart; std::shared_ptr buttonRestart; std::shared_ptr buttonBack; + std::shared_ptr buttonVideo; std::shared_ptr campaignName; std::shared_ptr labelCampaignDescription; std::shared_ptr campaignDescription; diff --git a/client/mainmenu/CPrologEpilogVideo.cpp b/client/mainmenu/CPrologEpilogVideo.cpp index d81bd07e7..22e7ad7cc 100644 --- a/client/mainmenu/CPrologEpilogVideo.cpp +++ b/client/mainmenu/CPrologEpilogVideo.cpp @@ -64,5 +64,6 @@ void CPrologEpilogVideo::clickPressed(const Point & cursorPosition) close(); CCS->soundh->stopSound(voiceSoundHandle); CCS->soundh->stopSound(videoSoundHandle); - exitCb(); + if(exitCb) + exitCb(); }