Indeterminate progress bar

This commit is contained in:
Paul Chote
2011-01-22 09:40:50 +13:00
parent 3609de8ca5
commit d39adf67b2
2 changed files with 15 additions and 4 deletions

View File

@@ -90,12 +90,12 @@ namespace OpenRA.Mods.RA.Widgets.Delegates
window = Widget.OpenWindow("INIT_COPY");
var status = window.GetWidget<LabelWidget>("STATUS");
var progress = window.GetWidget<ProgressBarWidget>("PROGRESS");
progress.Indeterminate = true;
// TODO: Handle cancelling copy
// TODO: Make the progress bar indeterminate
window.GetWidget<ButtonWidget>("CANCEL").IsVisible = () => false;
window.GetWidget("CANCEL").OnMouseUp = mi => { ShowInstallMethodDialog(); return true; };
window.GetWidget("RETRY").OnMouseUp = mi => PromptForCD();
window.GetWidget<ButtonWidget>("CANCEL").IsVisible = () => false;
status.GetText = () => "Copying...";
var error = false;
@@ -144,6 +144,7 @@ namespace OpenRA.Mods.RA.Widgets.Delegates
else if (!cancelled)
{
// Automatically extract
status.GetText = () => "Extracting...";
progress.Indeterminate = true;
var error = false;
Action<string> parseOutput = s =>