Generalise and combine cancel/confirm prompts.

This commit is contained in:
Paul Chote
2016-06-16 18:21:55 +01:00
parent bc03c199f5
commit 3ac42e1643
9 changed files with 94 additions and 146 deletions

View File

@@ -113,7 +113,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
};
}
ConfirmationDialogs.PromptConfirmAction(
ConfirmationDialogs.ButtonPrompt(
title: "Leave Mission",
text: "Leave this game and return to the menu?",
onConfirm: onQuit,
@@ -132,7 +132,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
exitEditorButton.OnClick = () =>
{
hideMenu = true;
ConfirmationDialogs.PromptConfirmAction(
ConfirmationDialogs.ButtonPrompt(
title: "Exit Map Editor",
text: "Exit and lose all unsaved changes?",
onConfirm: onQuit,
@@ -152,7 +152,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
surrenderButton.OnClick = () =>
{
hideMenu = true;
ConfirmationDialogs.PromptConfirmAction(
ConfirmationDialogs.ButtonPrompt(
title: "Surrender",
text: "Are you sure you want to surrender?",
onConfirm: onSurrender,