auto-restart the game after getting the game-files

This commit is contained in:
Matthias Mailänder
2012-06-25 14:47:08 +02:00
committed by Chris Forbes
parent a64629f1c5
commit 5318380bfa
6 changed files with 19 additions and 10 deletions

View File

@@ -24,11 +24,12 @@ namespace OpenRA.Mods.D2k.Widgets.Logic
Widget panel;
ProgressBarWidget progressBar;
LabelWidget statusLabel;
Action continueLoading;
ButtonWidget retryButton, backButton;
Widget installingContainer, insertDiskContainer;
[ObjectCreator.UseCtor]
public D2kInstallFromCDLogic(Widget widget)
public D2kInstallFromCDLogic(Widget widget, Action continueLoading)
{
panel = widget.Get("INSTALL_FROMCD_PANEL");
progressBar = panel.Get<ProgressBarWidget>("PROGRESS_BAR");
@@ -42,7 +43,9 @@ namespace OpenRA.Mods.D2k.Widgets.Logic
installingContainer = panel.Get("INSTALLING");
insertDiskContainer = panel.Get("INSERT_DISK");
CheckForDisk();
this.continueLoading = continueLoading;
}
public static bool IsValidDisk(string diskRoot)
@@ -114,6 +117,7 @@ namespace OpenRA.Mods.D2k.Widgets.Logic
{
statusLabel.GetText = () => "Music has been copied.";
backButton.IsDisabled = () => false;
continueLoading();
});
}
catch