mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-29 00:41:38 +02:00
video button
This commit is contained in:
@ -72,6 +72,7 @@ CBonusSelection::CBonusSelection()
|
|||||||
|
|
||||||
buttonStart = std::make_shared<CButton>(Point(475, 536), AnimationPath::builtin("CBBEGIB.DEF"), CButton::tooltip(), std::bind(&CBonusSelection::startMap, this), EShortcut::GLOBAL_ACCEPT);
|
buttonStart = std::make_shared<CButton>(Point(475, 536), AnimationPath::builtin("CBBEGIB.DEF"), CButton::tooltip(), std::bind(&CBonusSelection::startMap, this), EShortcut::GLOBAL_ACCEPT);
|
||||||
buttonRestart = std::make_shared<CButton>(Point(475, 536), AnimationPath::builtin("CBRESTB.DEF"), CButton::tooltip(), std::bind(&CBonusSelection::restartMap, this), EShortcut::GLOBAL_ACCEPT);
|
buttonRestart = std::make_shared<CButton>(Point(475, 536), AnimationPath::builtin("CBRESTB.DEF"), CButton::tooltip(), std::bind(&CBonusSelection::restartMap, this), EShortcut::GLOBAL_ACCEPT);
|
||||||
|
buttonVideo = std::make_shared<CButton>(Point(705, 214), AnimationPath::builtin("CBVIDEB.DEF"), CButton::tooltip(), [this](){ GH.windows().createAndPushWindow<CPrologEpilogVideo>(getCampaign()->scenario(CSH->campaignMap).prolog, nullptr); });
|
||||||
buttonBack = std::make_shared<CButton>(Point(624, 536), AnimationPath::builtin("CBCANCB.DEF"), CButton::tooltip(), std::bind(&CBonusSelection::goBack, this), EShortcut::GLOBAL_CANCEL);
|
buttonBack = std::make_shared<CButton>(Point(624, 536), AnimationPath::builtin("CBCANCB.DEF"), CButton::tooltip(), std::bind(&CBonusSelection::goBack, this), EShortcut::GLOBAL_CANCEL);
|
||||||
|
|
||||||
campaignName = std::make_shared<CLabel>(481, 28, FONT_BIG, ETextAlignment::TOPLEFT, Colors::YELLOW, CSH->si->getCampaignName());
|
campaignName = std::make_shared<CLabel>(481, 28, FONT_BIG, ETextAlignment::TOPLEFT, Colors::YELLOW, CSH->si->getCampaignName());
|
||||||
@ -309,6 +310,7 @@ void CBonusSelection::updateAfterStateChange()
|
|||||||
if(CSH->state != EClientState::GAMEPLAY)
|
if(CSH->state != EClientState::GAMEPLAY)
|
||||||
{
|
{
|
||||||
buttonRestart->disable();
|
buttonRestart->disable();
|
||||||
|
buttonVideo->disable();
|
||||||
buttonStart->enable();
|
buttonStart->enable();
|
||||||
if(!getCampaign()->conqueredScenarios().empty())
|
if(!getCampaign()->conqueredScenarios().empty())
|
||||||
buttonBack->block(true);
|
buttonBack->block(true);
|
||||||
@ -319,6 +321,7 @@ void CBonusSelection::updateAfterStateChange()
|
|||||||
{
|
{
|
||||||
buttonStart->disable();
|
buttonStart->disable();
|
||||||
buttonRestart->enable();
|
buttonRestart->enable();
|
||||||
|
buttonVideo->enable();
|
||||||
buttonBack->block(false);
|
buttonBack->block(false);
|
||||||
if(buttonDifficultyLeft)
|
if(buttonDifficultyLeft)
|
||||||
buttonDifficultyLeft->disable();
|
buttonDifficultyLeft->disable();
|
||||||
@ -401,6 +404,7 @@ void CBonusSelection::startMap()
|
|||||||
//block buttons immediately
|
//block buttons immediately
|
||||||
buttonStart->block(true);
|
buttonStart->block(true);
|
||||||
buttonRestart->block(true);
|
buttonRestart->block(true);
|
||||||
|
buttonVideo->block(true);
|
||||||
buttonBack->block(true);
|
buttonBack->block(true);
|
||||||
|
|
||||||
if(LOCPLINT) // we're currently ingame, so ask for starting new map and end game
|
if(LOCPLINT) // we're currently ingame, so ask for starting new map and end game
|
||||||
|
@ -65,6 +65,7 @@ public:
|
|||||||
std::shared_ptr<CButton> buttonStart;
|
std::shared_ptr<CButton> buttonStart;
|
||||||
std::shared_ptr<CButton> buttonRestart;
|
std::shared_ptr<CButton> buttonRestart;
|
||||||
std::shared_ptr<CButton> buttonBack;
|
std::shared_ptr<CButton> buttonBack;
|
||||||
|
std::shared_ptr<CButton> buttonVideo;
|
||||||
std::shared_ptr<CLabel> campaignName;
|
std::shared_ptr<CLabel> campaignName;
|
||||||
std::shared_ptr<CLabel> labelCampaignDescription;
|
std::shared_ptr<CLabel> labelCampaignDescription;
|
||||||
std::shared_ptr<CTextBox> campaignDescription;
|
std::shared_ptr<CTextBox> campaignDescription;
|
||||||
|
@ -64,5 +64,6 @@ void CPrologEpilogVideo::clickPressed(const Point & cursorPosition)
|
|||||||
close();
|
close();
|
||||||
CCS->soundh->stopSound(voiceSoundHandle);
|
CCS->soundh->stopSound(voiceSoundHandle);
|
||||||
CCS->soundh->stopSound(videoSoundHandle);
|
CCS->soundh->stopSound(videoSoundHandle);
|
||||||
|
if(exitCb)
|
||||||
exitCb();
|
exitCb();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user