restart the game instead of unmounting on the fly
avoid more redundancy between the load screens
This commit is contained in:
@@ -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);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user