private void loadBeatmap() { void updateState() { State = beatmap == null ? Visibility.Hidden : Visibility.Visible; Info?.FadeOut(250); Info?.Expire(); } if (beatmap == null) { updateState(); return; } LoadComponentAsync(new BufferedWedgeInfo(beatmap, ruleset.Value) { Shear = -Shear, Depth = Info?.Depth + 1 ?? 0, }, newInfo => { updateState(); Add(Info = newInfo); }); }
public void UpdateBeatmap(WorkingBeatmap beatmap) { LoadComponentAsync(new BufferedWedgeInfo(beatmap) { Shear = -Shear, Depth = Info?.Depth + 1 ?? 0, }, newInfo => { State = beatmap == null ? Visibility.Hidden : Visibility.Visible; Info?.FadeOut(250); Info?.Expire(); Add(Info = newInfo); }); }
public void UpdateBeatmap(WorkingBeatmap beatmap) { LoadComponentAsync(new BufferedWedgeInfo(beatmap) { Shear = -Shear, Depth = Info?.Depth + 1 ?? 0, }, newInfo => { State = beatmap == null ? Visibility.Hidden : Visibility.Visible; // ensure we ourselves are visible if not already. if (!IsPresent) { State = Visibility.Visible; } Info?.FadeOut(250); Info?.Expire(); Add(Info = newInfo); }); }