|
|
@@ -88,7 +88,7 @@ CLobbyScreen::CLobbyScreen(ESelectionScreen screenType, bool hideScreen)
|
|
|
|
|
|
card->iconDifficulty->addCallback(std::bind(&IServerAPI::setDifficulty, &GAME->server(), _1));
|
|
|
|
|
|
- buttonStart = std::make_shared<CButton>(Point(411, 535), AnimationPath::builtin("SCNRBEG.DEF"), LIBRARY->generaltexth->zelp[103], std::bind(&CLobbyScreen::startScenario, this, false), EShortcut::LOBBY_BEGIN_STANDARD_GAME);
|
|
|
+ buttonStart = std::make_shared<CButton>(Point(411, 535), AnimationPath::builtin("SCNRBEG.DEF"), LIBRARY->generaltexth->zelp[103], std::bind(&CLobbyScreen::start, this, false), EShortcut::LOBBY_BEGIN_STANDARD_GAME);
|
|
|
initLobby();
|
|
|
break;
|
|
|
}
|
|
|
@@ -97,13 +97,13 @@ CLobbyScreen::CLobbyScreen(ESelectionScreen screenType, bool hideScreen)
|
|
|
tabOpt = std::make_shared<OptionsTab>();
|
|
|
tabTurnOptions = std::make_shared<TurnOptionsTab>();
|
|
|
tabExtraOptions = std::make_shared<ExtraOptionsTab>();
|
|
|
- buttonStart = std::make_shared<CButton>(Point(411, 535), AnimationPath::builtin("SCNRLOD.DEF"), LIBRARY->generaltexth->zelp[103], std::bind(&CLobbyScreen::startScenario, this, false), EShortcut::LOBBY_LOAD_GAME);
|
|
|
+ buttonStart = std::make_shared<CButton>(Point(411, 535), AnimationPath::builtin("SCNRLOD.DEF"), LIBRARY->generaltexth->zelp[103], std::bind(&CLobbyScreen::start, this, false), EShortcut::LOBBY_LOAD_GAME);
|
|
|
initLobby();
|
|
|
break;
|
|
|
}
|
|
|
case ESelectionScreen::campaignList:
|
|
|
tabSel->callOnSelect = std::bind(&IServerAPI::setMapInfo, &GAME->server(), _1, nullptr);
|
|
|
- buttonStart = std::make_shared<CButton>(Point(411, 535), AnimationPath::builtin("SCNRLOD.DEF"), CButton::tooltip(), std::bind(&CLobbyScreen::startCampaign, this), EShortcut::LOBBY_BEGIN_CAMPAIGN);
|
|
|
+ buttonStart = std::make_shared<CButton>(Point(411, 535), AnimationPath::builtin("SCNRLOD.DEF"), CButton::tooltip(), std::bind(&CLobbyScreen::start, this, true), EShortcut::LOBBY_BEGIN_CAMPAIGN);
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
@@ -152,7 +152,7 @@ void CLobbyScreen::toggleTab(std::shared_ptr<CIntObject> tab)
|
|
|
|
|
|
if(tab == tabBattleOnlyMode)
|
|
|
{
|
|
|
- buttonStart->block(true);
|
|
|
+ tabBattleOnlyMode->setStartButtonEnabled();
|
|
|
card->clearSelection();
|
|
|
}
|
|
|
else
|
|
|
@@ -164,6 +164,16 @@ void CLobbyScreen::toggleTab(std::shared_ptr<CIntObject> tab)
|
|
|
CSelectionBase::toggleTab(tab);
|
|
|
}
|
|
|
|
|
|
+void CLobbyScreen::start(bool campaign)
|
|
|
+{
|
|
|
+ if(curTab == tabBattleOnlyMode)
|
|
|
+ tabBattleOnlyMode->startBattle();
|
|
|
+ else if(campaign)
|
|
|
+ startCampaign();
|
|
|
+ else
|
|
|
+ startScenario(false);
|
|
|
+}
|
|
|
+
|
|
|
void CLobbyScreen::startCampaign()
|
|
|
{
|
|
|
if(!GAME->server().mi)
|