protected override void ApplyState() { if (Item.State.Value != CarouselItemState.Collapsed && Alpha == 0) { starCounter.ReplayAnimation(); } base.ApplyState(); }
protected override void ApplyState(PanelSelectedState last = PanelSelectedState.Hidden) { base.ApplyState(last); if (last == PanelSelectedState.Hidden && State != last) { starCounter.ReplayAnimation(); } }
protected override void ApplyState() { if (Item.State.Value != CarouselItemState.Collapsed && Alpha == 0) { starCounter.ReplayAnimation(); } starDifficultyCancellationSource?.Cancel(); // Only compute difficulty when the item is visible. if (Item.State.Value != CarouselItemState.Collapsed) { // We've potentially cancelled the computation above so a new bindable is required. starDifficultyBindable = difficultyManager.GetBindableDifficulty(beatmap, (starDifficultyCancellationSource = new CancellationTokenSource()).Token); starDifficultyBindable.BindValueChanged(d => starCounter.Current = (float)d.NewValue.Stars, true); } base.ApplyState(); }