Changes to the RestartGame function to make it more streamlined

Removal of PromptAbortAction and inclusion into PromptConfirmAction
Changes to prevent a restart button being required for all mods
ConfirmAction
Addtion of named parameters to PromptConfirmAction
Moved StartGame from MissionBrowserLogic.cs to Game.cs
This commit is contained in:
Whinis
2016-01-14 22:24:30 -05:00
parent e0c033fe99
commit 9059e3e2c8
11 changed files with 166 additions and 190 deletions

View File

@@ -73,12 +73,12 @@ namespace OpenRA.Mods.Common.Widgets.Logic
OriginalGraphicsWindowedSize != current.Graphics.WindowedSize ||
OriginalGraphicsFullscreenSize != current.Graphics.FullscreenSize)
ConfirmationDialogs.PromptConfirmAction(
"Restart Now?",
"Some changes will not be applied until\nthe game is restarted. Restart now?",
Game.Restart,
closeAndExit,
"Restart Now",
"Restart Later");
title: "Restart Now?",
text: "Some changes will not be applied until\nthe game is restarted. Restart now?",
onConfirm: Game.Restart,
onCancel: closeAndExit,
confirmText: "Restart Now",
cancelText: "Restart Later");
else
closeAndExit();
};