@@ -284,14 +284,18 @@ bool ScenarioActivityConfigGUI::Update(int mouseX, int mouseY) {
284284 int maxHumanPlayers = m_SelectedActivity->GetMaxPlayerSupport ();
285285 int minTeamsRequired = m_SelectedActivity->GetMinTeamsRequired ();
286286
287+ std::vector humanPlayers = GetHumanPlayers ();
287288 std::string errorMessage = " " ;
288289 if (humansInTeams > maxHumanPlayers) {
289290 errorMessage = " Too many players assigned! Max for this activity is " + std::to_string (maxHumanPlayers);
290291 } else if (minTeamsRequired > teamsWithPlayers) {
291292 errorMessage = " Assign players to at least " + std::to_string (minTeamsRequired) + " of the teams!" ;
292293 } else if (teamWithHumans == 0 ) {
293294 errorMessage = " Assign human players to at least one team!" ;
295+ } else if (g_UInputMan.CheckMultiMouseKeyboardEnabled (humanPlayers) && !g_UInputMan.AllPlayerInputDevicesKnown (humanPlayers)) {
296+ errorMessage = " Some players have not set keyboard or mouse devices. Please go to input settings to configure!" ;
294297 }
298+
295299 m_StartErrorLabel->SetText (errorMessage);
296300 m_StartErrorLabel->SetVisible (!errorMessage.empty ());
297301 m_StartGameButton->SetVisible (errorMessage.empty ());
@@ -427,17 +431,10 @@ bool ScenarioActivityConfigGUI::HandleInputEvents() {
427431 SetEnabled (false );
428432 } else if (guiEvent.GetControl () == m_StartGameButton) {
429433 // Make sure all players have known input devices if multimouse is enabled.
430- std::vector humanPlayers = GetHumanPlayers ();
431- if (g_UInputMan.CheckMultiMouseKeyboardEnabled (humanPlayers) && g_UInputMan.AllPlayerInputDevicesKnown (humanPlayers)) {
432- g_GUISound.ButtonPressSound ()->Play ();
433- StartGame ();
434- SetEnabled (false );
435- return true ;
436- } else {
437- // TODO: Show message and device selection.
438- g_GUISound.UserErrorSound ()->Play ();
439- return false ;
440- }
434+ g_GUISound.ButtonPressSound ()->Play ();
435+ StartGame ();
436+ SetEnabled (false );
437+ return true ;
441438 }
442439 } else if (guiEvent.GetType () == GUIEvent::Notification) {
443440 if (guiEvent.GetControl () == m_ActivityDifficultySlider) {
0 commit comments