|
@@ -12,6 +12,7 @@
|
|
|
|
|
|
#include "CBonusSelection.h"
|
|
|
#include "TurnOptionsTab.h"
|
|
|
+#include "ExtraOptionsTab.h"
|
|
|
#include "OptionsTab.h"
|
|
|
#include "RandomMapTab.h"
|
|
|
#include "SelectionTab.h"
|
|
@@ -53,7 +54,10 @@ CLobbyScreen::CLobbyScreen(ESelectionScreen screenType)
|
|
|
|
|
|
buttonOptions = std::make_shared<CButton>(Point(411, 510), AnimationPath::builtin("GSPBUTT.DEF"), CGI->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, 510), AnimationPath::builtin("GSPBUT2.DEF"), CGI->generaltexth->zelp[46], std::bind(&CLobbyScreen::toggleTab, this, tabTurnOptions), EShortcut::NONE);
|
|
|
+ {
|
|
|
+ buttonTurnOptions = std::make_shared<CButton>(Point(619, 105), AnimationPath::builtin("GSPBUT2.DEF"), CGI->generaltexth->zelp[46], std::bind(&CLobbyScreen::toggleTab, this, tabTurnOptions), EShortcut::NONE);
|
|
|
+ buttonExtraOptions = std::make_shared<CButton>(Point(619, 510), AnimationPath::builtin("GSPBUT2.DEF"), CGI->generaltexth->zelp[46], std::bind(&CLobbyScreen::toggleTab, this, tabExtraOptions), EShortcut::NONE);
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
buttonChat = std::make_shared<CButton>(Point(619, 80), AnimationPath::builtin("GSPBUT2.DEF"), CGI->generaltexth->zelp[48], std::bind(&CLobbyScreen::toggleChat, this), EShortcut::LOBBY_HIDE_CHAT);
|
|
@@ -65,6 +69,7 @@ CLobbyScreen::CLobbyScreen(ESelectionScreen screenType)
|
|
|
{
|
|
|
tabOpt = std::make_shared<OptionsTab>();
|
|
|
tabTurnOptions = std::make_shared<TurnOptionsTab>();
|
|
|
+ tabExtraOptions = std::make_shared<ExtraOptionsTab>();
|
|
|
tabRand = std::make_shared<RandomMapTab>();
|
|
|
tabRand->mapInfoChanged += std::bind(&IServerAPI::setMapInfo, CSH, _1, _2);
|
|
|
buttonRMG = std::make_shared<CButton>(Point(411, 105), AnimationPath::builtin("GSPBUTT.DEF"), CGI->generaltexth->zelp[47], 0, EShortcut::LOBBY_RANDOM_MAP);
|
|
@@ -84,6 +89,7 @@ CLobbyScreen::CLobbyScreen(ESelectionScreen screenType)
|
|
|
{
|
|
|
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"), CGI->generaltexth->zelp[103], std::bind(&CLobbyScreen::startScenario, this, false), EShortcut::LOBBY_LOAD_GAME);
|
|
|
initLobby();
|
|
|
break;
|
|
@@ -122,6 +128,8 @@ void CLobbyScreen::toggleTab(std::shared_ptr<CIntObject> tab)
|
|
|
CSH->sendGuiAction(LobbyGuiAction::OPEN_RANDOM_MAP_OPTIONS);
|
|
|
else if(tab == tabTurnOptions)
|
|
|
CSH->sendGuiAction(LobbyGuiAction::OPEN_TURN_OPTIONS);
|
|
|
+ else if(tab == tabExtraOptions)
|
|
|
+ CSH->sendGuiAction(LobbyGuiAction::OPEN_EXTRA_OPTIONS);
|
|
|
CSelectionBase::toggleTab(tab);
|
|
|
}
|
|
|
|
|
@@ -157,6 +165,9 @@ void CLobbyScreen::toggleMode(bool host)
|
|
|
if (buttonTurnOptions)
|
|
|
buttonTurnOptions->addTextOverlay(CGI->generaltexth->translate("vcmi.optionsTab.turnOptions.hover"), FONT_SMALL, buttonColor);
|
|
|
|
|
|
+ if (buttonExtraOptions)
|
|
|
+ buttonExtraOptions->addTextOverlay(CGI->generaltexth->translate("vcmi.optionsTab.extraOptions.hover"), FONT_SMALL, buttonColor);
|
|
|
+
|
|
|
if(buttonRMG)
|
|
|
{
|
|
|
buttonRMG->addTextOverlay(CGI->generaltexth->allTexts[740], FONT_SMALL, buttonColor);
|
|
@@ -168,10 +179,14 @@ void CLobbyScreen::toggleMode(bool host)
|
|
|
if (buttonTurnOptions)
|
|
|
buttonTurnOptions->block(!host);
|
|
|
|
|
|
+ if (buttonExtraOptions)
|
|
|
+ buttonExtraOptions->block(!host);
|
|
|
+
|
|
|
if(CSH->mi)
|
|
|
{
|
|
|
tabOpt->recreate();
|
|
|
tabTurnOptions->recreate();
|
|
|
+ tabExtraOptions->recreate();
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -191,7 +206,9 @@ void CLobbyScreen::updateAfterStateChange()
|
|
|
if (tabOpt)
|
|
|
tabOpt->recreate();
|
|
|
if (tabTurnOptions)
|
|
|
- tabTurnOptions->recreate();
|
|
|
+ tabTurnOptions->recreate();
|
|
|
+ if (tabExtraOptions)
|
|
|
+ tabExtraOptions->recreate();
|
|
|
}
|
|
|
|
|
|
buttonStart->block(CSH->mi == nullptr || CSH->isGuest());
|