Ensure transformations are never used prior to being added to the Drawable tree.

This commit is contained in:
Thomas Müller
2016-11-06 11:13:52 +01:00
parent 32ee20b843
commit 103176826f
8 changed files with 25 additions and 13 deletions

View File

@ -123,8 +123,6 @@ namespace osu.Game.Graphics.UserInterface
{
base.Load(game);
Flush(false, TransformType);
DisplayedCount = Count;
DisplayedCountSpriteText.Text = FormatCount(count);
@ -132,6 +130,13 @@ namespace osu.Game.Graphics.UserInterface
DisplayedCountSpriteText.Origin = this.Origin;
}
protected override void LoadComplete()
{
base.LoadComplete();
Flush(false, TransformType);
}
/// <summary>
/// Sets count value, bypassing rollover animation.
/// </summary>

View File

@ -70,14 +70,16 @@ namespace osu.Game.Graphics.UserInterface
{
return count;
}
set
{
prevCount = VisibleValue;
count = value;
if (IsLoaded)
{
transformCount(prevCount, count);
prevCount = VisibleValue;
transformCount(prevCount, value);
}
count = value;
}
}

View File

@ -57,9 +57,9 @@ namespace osu.Game.Graphics.UserInterface.Volume
};
}
protected override void Load(BaseGame game)
protected override void LoadComplete()
{
base.Load(game);
base.LoadComplete();
updateFill();
}