|
|
@@ -58,7 +58,11 @@ CLobbyScreen::CLobbyScreen(ESelectionScreen screenType, bool hideScreen)
|
|
|
buttonOptions = std::make_shared<CButton>(Point(411, 510), AnimationPath::builtin("GSPBUTT.DEF"), LIBRARY->generaltexth->zelp[46], std::bind(&CLobbyScreen::toggleTab, this, tabOpt), EShortcut::LOBBY_ADDITIONAL_OPTIONS);
|
|
|
if(settings["general"]["enableUiEnhancements"].Bool())
|
|
|
{
|
|
|
- buttonTurnOptions = std::make_shared<CButton>(Point(619, 105), AnimationPath::builtin("GSPBUT2.DEF"), LIBRARY->generaltexth->zelp[46], std::bind(&CLobbyScreen::toggleTab, this, tabTurnOptions), EShortcut::LOBBY_TURN_OPTIONS);
|
|
|
+ if(screenType == ESelectionScreen::newGame)
|
|
|
+ buttonBattleMode = std::make_shared<CButton>(Point(619, 105), AnimationPath::builtin("GSPButton2Arrow"), CButton::tooltip("", LIBRARY->generaltexth->translate("vcmi.lobby.battleOnlyMode.help")), [this](){
|
|
|
+ updateAfterStateChange(); // creates tabBattleOnlyMode -> cannot created by init of object because GAME->server().isGuest() isn't valid at that point
|
|
|
+ toggleTab(tabBattleOnlyMode);
|
|
|
+ }, EShortcut::LOBBY_BATTLE_MODE);
|
|
|
buttonExtraOptions = std::make_shared<CButton>(Point(619, 510), AnimationPath::builtin("GSPBUT2.DEF"), LIBRARY->generaltexth->zelp[46], std::bind(&CLobbyScreen::toggleTab, this, tabExtraOptions), EShortcut::LOBBY_EXTRA_OPTIONS);
|
|
|
}
|
|
|
};
|
|
|
@@ -225,8 +229,8 @@ void CLobbyScreen::toggleMode(bool host)
|
|
|
buttonSelect->setTextOverlay(" " + LIBRARY->generaltexth->allTexts[500], FONT_SMALL, buttonColor);
|
|
|
buttonOptions->setTextOverlay(LIBRARY->generaltexth->allTexts[501], FONT_SMALL, buttonColor);
|
|
|
|
|
|
- if (buttonTurnOptions)
|
|
|
- buttonTurnOptions->setTextOverlay(LIBRARY->generaltexth->translate("vcmi.optionsTab.turnOptions.hover"), FONT_SMALL, buttonColor);
|
|
|
+ if (buttonBattleMode)
|
|
|
+ buttonBattleMode->setTextOverlay(LIBRARY->generaltexth->translate("vcmi.lobby.battleOnlyMode"), FONT_SMALL, buttonColor);
|
|
|
|
|
|
if (buttonExtraOptions)
|
|
|
buttonExtraOptions->setTextOverlay(LIBRARY->generaltexth->translate("vcmi.optionsTab.extraOptions.hover"), FONT_SMALL, buttonColor);
|
|
|
@@ -239,8 +243,8 @@ void CLobbyScreen::toggleMode(bool host)
|
|
|
buttonSelect->block(!host);
|
|
|
buttonOptions->block(!host);
|
|
|
|
|
|
- if (buttonTurnOptions)
|
|
|
- buttonTurnOptions->block(!host);
|
|
|
+ if (buttonBattleMode)
|
|
|
+ buttonBattleMode->block(!host);
|
|
|
|
|
|
if (buttonExtraOptions)
|
|
|
buttonExtraOptions->block(!host);
|