Use mod switching for settings menu restart.
This commit is contained in:
@@ -74,13 +74,21 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
OriginalGraphicsWindowedSize != current.Graphics.WindowedSize ||
|
OriginalGraphicsWindowedSize != current.Graphics.WindowedSize ||
|
||||||
OriginalGraphicsFullscreenSize != current.Graphics.FullscreenSize ||
|
OriginalGraphicsFullscreenSize != current.Graphics.FullscreenSize ||
|
||||||
OriginalServerDiscoverNatDevices != current.Server.DiscoverNatDevices)
|
OriginalServerDiscoverNatDevices != current.Server.DiscoverNatDevices)
|
||||||
|
{
|
||||||
|
Action restart = () =>
|
||||||
|
{
|
||||||
|
var external = Game.ExternalMods[ExternalMod.MakeKey(Game.ModData.Manifest)];
|
||||||
|
Game.SwitchToExternalMod(external, null, closeAndExit);
|
||||||
|
};
|
||||||
|
|
||||||
ConfirmationDialogs.ButtonPrompt(
|
ConfirmationDialogs.ButtonPrompt(
|
||||||
title: "Restart Now?",
|
title: "Restart Now?",
|
||||||
text: "Some changes will not be applied until\nthe game is restarted. Restart now?",
|
text: "Some changes will not be applied until\nthe game is restarted. Restart now?",
|
||||||
onConfirm: Game.Restart,
|
onConfirm: restart,
|
||||||
onCancel: closeAndExit,
|
onCancel: closeAndExit,
|
||||||
confirmText: "Restart Now",
|
confirmText: "Restart Now",
|
||||||
cancelText: "Restart Later");
|
cancelText: "Restart Later");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
closeAndExit();
|
closeAndExit();
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user