mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Fix RollingCounter not updating initial value if changed before loaded
This commit is contained in:
@ -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>
|
||||
|
Reference in New Issue
Block a user