mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 06:12:56 +08:00
Fix RollingCounter not updating initial value if changed before loaded
This commit is contained in:
parent
d3245dda1c
commit
8b7446c43f
@ -65,12 +65,6 @@ namespace osu.Game.Graphics.UserInterface
|
||||
protected RollingCounter()
|
||||
{
|
||||
AutoSizeAxes = Axes.Both;
|
||||
|
||||
Current.ValueChanged += val =>
|
||||
{
|
||||
if (IsLoaded)
|
||||
TransformCount(DisplayedCount, val.NewValue);
|
||||
};
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
@ -81,6 +75,13 @@ namespace osu.Game.Graphics.UserInterface
|
||||
Child = displayedCountSpriteText;
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
Current.BindValueChanged(val => TransformCount(DisplayedCount, val.NewValue), true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets count value, bypassing rollover animation.
|
||||
/// </summary>
|
||||
|
Loading…
Reference in New Issue
Block a user