internal static void UpdateProgressState(ModLoadStep step) { if (progressBar == null) { return; } progressBar.progress = ProgressParser.SetModState(step, ref progressBar.text); }
internal static void UpdateProgressState(ModLoadStep step) { if (UIStyleValues.ProgressBar == null) { return; } UIStyleValues.ProgressBar.progress = ProgressParser.SetModState(step, ref UIStyleValues.ProgressBar.text.text); UIStyleValues.ProgressBar.text.isDirty = true; }
public static float SetModState(ModLoadStep step, ref string progressText) { currentStep = step; if (!stepsNames.TryGetValue(step, out currentStepName)) { currentStepName = $"{step}"; } progressText = currentStepName; float generationPart = generationPercent * 0.01f; return(generationPart + (((int)currentStep - 1) * ((1 - generationPart) / 5))); }