mirror of
https://github.com/ppy/osu.git
synced 2025-03-05 16:02:56 +08:00
Move actual star updating to star rating display
This commit is contained in:
parent
5becac6431
commit
676240928e
@ -63,12 +63,6 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
|
|
||||||
AddSliderStep("change star difficulty", 0, 11.9, 5.55, v =>
|
AddSliderStep("change star difficulty", 0, 11.9, 5.55, v =>
|
||||||
{
|
{
|
||||||
// Difficulty cache lookup is a pain in the ass to work with.
|
|
||||||
// This logic is ugly and needs to be reconsidered.
|
|
||||||
|
|
||||||
if (infoWedge.Info != null)
|
|
||||||
infoWedge.Info!.ActualStars.Value = v;
|
|
||||||
|
|
||||||
foreach (var hasCurrentValue in infoWedge.Info.ChildrenOfType<IHasCurrentValue<StarDifficulty>>())
|
foreach (var hasCurrentValue in infoWedge.Info.ChildrenOfType<IHasCurrentValue<StarDifficulty>>())
|
||||||
hasCurrentValue.Current.Value = new StarDifficulty(v, 0);
|
hasCurrentValue.Current.Value = new StarDifficulty(v, 0);
|
||||||
});
|
});
|
||||||
|
@ -186,7 +186,7 @@ namespace osu.Game.Screens.Select
|
|||||||
{
|
{
|
||||||
// use actual stars as star counter has its own animation
|
// use actual stars as star counter has its own animation
|
||||||
starCounter.Current = (float)s.NewValue;
|
starCounter.Current = (float)s.NewValue;
|
||||||
});
|
}, true);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -301,7 +301,6 @@ namespace osu.Game.Screens.Select
|
|||||||
starDifficulty.BindValueChanged(s =>
|
starDifficulty.BindValueChanged(s =>
|
||||||
{
|
{
|
||||||
starRatingDisplay.Current.Value = s.NewValue ?? default;
|
starRatingDisplay.Current.Value = s.NewValue ?? default;
|
||||||
ActualStars.Value = s.NewValue?.Stars ?? 0;
|
|
||||||
|
|
||||||
// Don't roll the counter on initial display (but still allow it to roll on applying mods etc.)
|
// Don't roll the counter on initial display (but still allow it to roll on applying mods etc.)
|
||||||
if (!starRatingDisplay.IsPresent)
|
if (!starRatingDisplay.IsPresent)
|
||||||
@ -309,6 +308,11 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
starRatingDisplay.FadeIn(transition_duration);
|
starRatingDisplay.FadeIn(transition_duration);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
starRatingDisplay.Current.BindValueChanged(s =>
|
||||||
|
{
|
||||||
|
ActualStars.Value = s.NewValue.Stars;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Dispose(bool isDisposing)
|
protected override void Dispose(bool isDisposing)
|
||||||
|
Loading…
Reference in New Issue
Block a user