|
1 | | -// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. |
| 1 | +// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. |
2 | 2 | // See the LICENCE file in the repository root for full licence text. |
3 | 3 |
|
4 | 4 | using System; |
@@ -77,8 +77,14 @@ private void applyHiddenState(DrawableHitObject drawableObject, bool increaseVis |
77 | 77 | } |
78 | 78 | else if (drawableObject is DrawableSpinner spinner) |
79 | 79 | { |
80 | | - spinner.Body.OnSkinChanged += () => hideSpinnerApproachCircle(spinner); |
| 80 | + spinner.Body.OnSkinChanged += () => |
| 81 | + { |
| 82 | + hideSpinnerApproachCircle(spinner); |
| 83 | + hideSpinnerBackground(spinner); |
| 84 | + }; |
| 85 | + |
81 | 86 | hideSpinnerApproachCircle(spinner); |
| 87 | + hideSpinnerBackground(spinner); |
82 | 88 | } |
83 | 89 | } |
84 | 90 |
|
@@ -130,8 +136,6 @@ private void applyHiddenState(DrawableHitObject drawableObject, bool increaseVis |
130 | 136 |
|
131 | 137 | case DrawableSpinner spinner: |
132 | 138 | // hide elements we don't care about. |
133 | | - // todo: hide background |
134 | | - |
135 | 139 | using (spinner.BeginAbsoluteSequence(fadeStartTime)) |
136 | 140 | spinner.FadeOut(fadeDuration); |
137 | 141 |
|
@@ -192,5 +196,15 @@ private static void hideSpinnerApproachCircle(DrawableSpinner spinner) |
192 | 196 | using (spinner.BeginAbsoluteSequence(spinner.HitObject.StartTime - spinner.HitObject.TimePreempt)) |
193 | 197 | approachCircle.Hide(); |
194 | 198 | } |
| 199 | + |
| 200 | + private static void hideSpinnerBackground(DrawableSpinner spinner) |
| 201 | + { |
| 202 | + var spinnerBackground = (spinner.Body.Drawable as IHasSpinnerBackground)?.SpinnerBackground; |
| 203 | + if (spinnerBackground == null) |
| 204 | + return; |
| 205 | + |
| 206 | + using (spinner.BeginAbsoluteSequence(spinner.HitObject.StartTime - spinner.HitObject.TimePreempt)) |
| 207 | + spinnerBackground.Hide(); |
| 208 | + } |
195 | 209 | } |
196 | 210 | } |
0 commit comments