restart the game instead of unmounting on the fly

avoid more redundancy between the load screens
This commit is contained in:
Matthias Mailänder
2014-06-28 12:51:54 +02:00
parent 334605287c
commit 2f55768c1b
11 changed files with 64 additions and 105 deletions

View File

@@ -20,7 +20,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
public InstallLogic(Widget widget, IReadOnlyDictionary<string, string> installData, Action continueLoading)
{
var panel = widget.Get("INSTALL_PANEL");
var args = new WidgetArgs()
var widgetArgs = new WidgetArgs()
{
{ "afterInstall", () => { Ui.CloseWindow(); continueLoading(); } },
{ "installData", installData },
@@ -28,15 +28,15 @@ namespace OpenRA.Mods.RA.Widgets.Logic
};
panel.Get<ButtonWidget>("DOWNLOAD_BUTTON").OnClick = () =>
Ui.OpenWindow("INSTALL_DOWNLOAD_PANEL", args);
Ui.OpenWindow("INSTALL_DOWNLOAD_PANEL", widgetArgs);
panel.Get<ButtonWidget>("INSTALL_BUTTON").OnClick = () =>
Ui.OpenWindow("INSTALL_FROMCD_PANEL", args);
Ui.OpenWindow("INSTALL_FROMCD_PANEL", widgetArgs);
panel.Get<ButtonWidget>("BACK_BUTTON").OnClick = () =>
{
Game.Settings.Game.PreviousMod = Game.modData.Manifest.Mod.Id;
Game.InitializeWithMod("modchooser", null);
Game.InitializeMod("modchooser", null);
};
}
}