Always prompt the user to confirm when leaving a game

This commit is contained in:
Ivaylo Draganov
2019-06-10 00:41:13 +03:00
committed by Paul Chote
parent 2204e807b8
commit 14bc7885b3

View File

@@ -194,18 +194,13 @@ namespace OpenRA.Mods.Common.Widgets.Logic
{ {
hideMenu = true; hideMenu = true;
if (world.LocalPlayer == null || world.LocalPlayer.WinState != WinState.Won) ConfirmationDialogs.ButtonPrompt(
{ title: "Leave Mission",
ConfirmationDialogs.ButtonPrompt( text: "Leave this game and return to the menu?",
title: "Leave Mission", onConfirm: OnQuit,
text: "Leave this game and return to the menu?", onCancel: ShowMenu,
onConfirm: OnQuit, confirmText: "Leave",
onCancel: ShowMenu, cancelText: "Stay");
confirmText: "Leave",
cancelText: "Stay");
}
else
OnQuit();
}; };
} }