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;
if (world.LocalPlayer == null || world.LocalPlayer.WinState != WinState.Won)
{
ConfirmationDialogs.ButtonPrompt(
title: "Leave Mission",
text: "Leave this game and return to the menu?",
onConfirm: OnQuit,
onCancel: ShowMenu,
confirmText: "Leave",
cancelText: "Stay");
}
else
OnQuit();
ConfirmationDialogs.ButtonPrompt(
title: "Leave Mission",
text: "Leave this game and return to the menu?",
onConfirm: OnQuit,
onCancel: ShowMenu,
confirmText: "Leave",
cancelText: "Stay");
};
}