Explorar o código

Do not use enter for non-campaign game start, do not use "B" for non-campaign game start

M hai 1 ano
pai
achega
6fed084055

+ 2 - 1
client/gui/Shortcut.h

@@ -59,7 +59,8 @@ enum class EShortcut
 	MAIN_MENU_CAMPAIGN_CUSTOM,
 
 	// Game lobby / scenario selection
-	LOBBY_BEGIN_GAME, // b, Return
+	LOBBY_BEGIN_STANDARD_GAME, // b
+	LOBBY_BEGIN_CAMPAIGN, // Return
 	LOBBY_LOAD_GAME,  // l, Return
 	LOBBY_SAVE_GAME,  // s, Return
 	LOBBY_RANDOM_MAP, // Open random map tab

+ 2 - 1
client/gui/ShortcutHandler.cpp

@@ -99,7 +99,8 @@ EShortcut ShortcutHandler::findShortcut(const std::string & identifier ) const
 		{"mainMenuCampaignRoe",      EShortcut::MAIN_MENU_CAMPAIGN_ROE    },
 		{"mainMenuCampaignAb",       EShortcut::MAIN_MENU_CAMPAIGN_AB     },
 		{"mainMenuCampaignCustom",   EShortcut::MAIN_MENU_CAMPAIGN_CUSTOM },
-		{"lobbyBeginGame",           EShortcut::LOBBY_BEGIN_GAME          },
+		{"lobbyBeginStandardGame",   EShortcut::LOBBY_BEGIN_STANDARD_GAME },
+		{"lobbyBeginCampaign",       EShortcut::LOBBY_BEGIN_CAMPAIGN      },
 		{"lobbyLoadGame",            EShortcut::LOBBY_LOAD_GAME           },
 		{"lobbySaveGame",            EShortcut::LOBBY_SAVE_GAME           },
 		{"lobbyRandomMap",           EShortcut::LOBBY_RANDOM_MAP          },

+ 2 - 2
client/lobby/CLobbyScreen.cpp

@@ -82,7 +82,7 @@ CLobbyScreen::CLobbyScreen(ESelectionScreen screenType)
 
 		card->iconDifficulty->addCallback(std::bind(&IServerAPI::setDifficulty, CSH, _1));
 
-		buttonStart = std::make_shared<CButton>(Point(411, 535), AnimationPath::builtin("SCNRBEG.DEF"), CGI->generaltexth->zelp[103], std::bind(&CLobbyScreen::startScenario, this, false), EShortcut::LOBBY_BEGIN_GAME);
+		buttonStart = std::make_shared<CButton>(Point(411, 535), AnimationPath::builtin("SCNRBEG.DEF"), CGI->generaltexth->zelp[103], std::bind(&CLobbyScreen::startScenario, this, false), EShortcut::LOBBY_BEGIN_STANDARD_GAME);
 		initLobby();
 		break;
 	}
@@ -97,7 +97,7 @@ CLobbyScreen::CLobbyScreen(ESelectionScreen screenType)
 	}
 	case ESelectionScreen::campaignList:
 		tabSel->callOnSelect = std::bind(&IServerAPI::setMapInfo, CSH, _1, nullptr);
-		buttonStart = std::make_shared<CButton>(Point(411, 535), AnimationPath::builtin("SCNRLOD.DEF"), CButton::tooltip(), std::bind(&CLobbyScreen::startCampaign, this), EShortcut::LOBBY_BEGIN_GAME);
+		buttonStart = std::make_shared<CButton>(Point(411, 535), AnimationPath::builtin("SCNRLOD.DEF"), CButton::tooltip(), std::bind(&CLobbyScreen::startCampaign, this), EShortcut::LOBBY_BEGIN_CAMPAIGN);
 		break;
 	}
 

+ 2 - 1
config/shortcutsConfig.json

@@ -43,7 +43,8 @@
 		"mainMenuCampaignRoe":      "R",
 		"mainMenuCampaignAb":       "A",
 		"mainMenuCampaignCustom":   "C",
-		"lobbyBeginGame":           [ "B", "Return", "Keypad Enter"],
+		"lobbyBeginStandardGame":   "B",
+		"lobbyBeginCampaign":       [ "Return", "Keypad Enter"],
 		"lobbyLoadGame":            [ "L", "Return", "Keypad Enter"],
 		"lobbySaveGame":            [ "S", "Return", "Keypad Enter"],
 		"lobbyRandomMap":           "R",