public override void OnActivate() { if (OnQueueProcessed == null) { OnQueueProcessed = () => Main.menuMode = 0; } UpdateDisplayText(); _loadProgress.SetProgress(0f); if (!UIModBrowser.PlatformSupportsTls12) { // Needed for downloads from Github Interface.errorMessage.Show("TLS 1.2 not supported on this computer.", 0); // github releases return; } _cts?.Dispose(); _cts = new CancellationTokenSource(); ProcessQueue(); }
public override void OnActivate() { if (OnQueueProcessed == null) { OnQueueProcessed = () => Main.menuMode = 0; } UpdateDisplayText(); _loadProgress.SetProgress(0f); // This doesn't actually work here, apparently you can't switch UIs OnActivate anyway /*if (!UIModBrowser.PlatformSupportsTls12) { * // Needed for downloads from Github * Interface.errorMessage.Show("TLS 1.2 not supported on this computer.", 0); // github releases * return; * }*/ _cts?.Dispose(); _cts = new CancellationTokenSource(); ProcessQueue(); }
internal void SetProgress(double percent) { _loadProgress?.SetProgress((float)percent); }