Example #1
0
        protected override void ApplyState()
        {
            if (Item.State.Value != CarouselItemState.Collapsed && Alpha == 0)
            {
                starCounter.ReplayAnimation();
            }

            base.ApplyState();
        }
Example #2
0
        protected override void ApplyState(PanelSelectedState last = PanelSelectedState.Hidden)
        {
            base.ApplyState(last);

            if (last == PanelSelectedState.Hidden && State != last)
            {
                starCounter.ReplayAnimation();
            }
        }
Example #3
0
        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();
        }