mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 15:47:26 +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()
|
protected RollingCounter()
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Both;
|
AutoSizeAxes = Axes.Both;
|
||||||
|
|
||||||
Current.ValueChanged += val =>
|
|
||||||
{
|
|
||||||
if (IsLoaded)
|
|
||||||
TransformCount(DisplayedCount, val.NewValue);
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
@ -81,6 +75,13 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
Child = displayedCountSpriteText;
|
Child = displayedCountSpriteText;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void LoadComplete()
|
||||||
|
{
|
||||||
|
base.LoadComplete();
|
||||||
|
|
||||||
|
Current.BindValueChanged(val => TransformCount(DisplayedCount, val.NewValue), true);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets count value, bypassing rollover animation.
|
/// Sets count value, bypassing rollover animation.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user