diff --git a/OpenRA.Game/Game.cs b/OpenRA.Game/Game.cs index 54c1ac8c59..0cf43ed332 100644 --- a/OpenRA.Game/Game.cs +++ b/OpenRA.Game/Game.cs @@ -443,8 +443,8 @@ namespace OpenRA if (!string.IsNullOrEmpty(window)) { var installData = modData.Manifest.ContentInstaller; - if (installData.InstallerMenuWidget != null) - Ui.LoadWidget(installData.InstallerMenuWidget, Ui.Root, new WidgetArgs()); + if (installData.InstallerBackgroundWidget != null) + Ui.LoadWidget(installData.InstallerBackgroundWidget, Ui.Root, new WidgetArgs()); Widgets.Ui.OpenWindow(window, new WidgetArgs()); } diff --git a/OpenRA.Mods.RA/Widgets/Logic/DownloadPackagesLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/DownloadPackagesLogic.cs index cb98c121e2..db5e34e2cd 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/DownloadPackagesLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/DownloadPackagesLogic.cs @@ -22,16 +22,16 @@ namespace OpenRA.Mods.RA.Widgets.Logic public class DownloadPackagesLogic { readonly Widget panel; - readonly InstallData installData; + readonly string mirrorListUrl; readonly ProgressBarWidget progressBar; readonly LabelWidget statusLabel; readonly Action afterInstall; string mirror; [ObjectCreator.UseCtor] - public DownloadPackagesLogic(Widget widget, Action afterInstall) + public DownloadPackagesLogic(Widget widget, Action afterInstall, string mirrorListUrl) { - installData = Game.modData.Manifest.ContentInstaller; + this.mirrorListUrl = mirrorListUrl; this.afterInstall = afterInstall; panel = widget.Get("INSTALL_DOWNLOAD_PANEL"); @@ -130,7 +130,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic }; // Get the list of mirrors - var updateMirrors = new Download(installData.PackageMirrorList, mirrorsFile, onDownloadProgress, onFetchMirrorsComplete); + var updateMirrors = new Download(mirrorListUrl, mirrorsFile, onDownloadProgress, onFetchMirrorsComplete); cancelButton.OnClick = () => { updateMirrors.Cancel(); Ui.CloseWindow(); }; retryButton.OnClick = () => { updateMirrors.Cancel(); ShowDownloadDialog(); }; } diff --git a/OpenRA.Mods.RA/Widgets/Logic/InstallLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/InstallLogic.cs index a1162755c1..69bfeca4c3 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/InstallLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/InstallLogic.cs @@ -19,11 +19,13 @@ namespace OpenRA.Mods.RA.Widgets.Logic [ObjectCreator.UseCtor] public InstallLogic(Widget widget, Action continueLoading) { + var mirrorListUrl = Game.modData.Manifest.ContentInstaller.PackageMirrorList; var panel = widget.Get("INSTALL_PANEL"); var widgetArgs = new WidgetArgs() { { "afterInstall", () => { Ui.CloseWindow(); continueLoading(); } }, - { "continueLoading", continueLoading } + { "continueLoading", continueLoading }, + { "mirrorListUrl", mirrorListUrl }, }; panel.Get("DOWNLOAD_BUTTON").OnClick = () => diff --git a/OpenRA.Mods.RA/Widgets/Logic/InstallMusicLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/InstallMusicLogic.cs index 48a4a2d2ff..94971f7b52 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/InstallMusicLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/InstallMusicLogic.cs @@ -44,12 +44,13 @@ namespace OpenRA.Mods.RA.Widgets.Logic var downloadButton = installMusicContainer.GetOrNull("DOWNLOAD_BUTTON"); if (downloadButton != null) { - var installData = Game.modData.Manifest.ContentInstaller; - downloadButton.IsVisible = () => !string.IsNullOrEmpty(installData.MusicPackageMirrorList); + var mirrorListUrl = Game.modData.Manifest.ContentInstaller.MusicPackageMirrorList; + downloadButton.IsVisible = () => !string.IsNullOrEmpty(mirrorListUrl); downloadButton.OnClick = () => { Ui.OpenWindow("INSTALL_DOWNLOAD_PANEL", new WidgetArgs() { { "afterInstall", () => Game.InitializeMod(Game.Settings.Game.Mod, null) }, + { "mirrorListUrl", mirrorListUrl }, }); }; }