Changed animation to match the one in Comp3 6c(will probably clean later), changed avatar sprite to a toolbar avatar(doesn't load in visual test since there's no OsuGame), removed random test case data, now static

This commit is contained in:
DrabWeb
2017-03-13 12:31:46 -03:00
parent 442a2c97db
commit 8e90e05f23
3 changed files with 240 additions and 49 deletions

View File

@ -76,7 +76,7 @@ namespace osu.Game.Overlays.Toolbar
Masking = true;
}
[BackgroundDependencyLoader]
[BackgroundDependencyLoader(permitNulls:true)]
private void load(OsuGame game, TextureStore textures)
{
this.game = game;
@ -98,18 +98,21 @@ namespace osu.Game.Overlays.Toolbar
newSprite.FillMode = FillMode.Fit;
newSprite.LoadAsync(game, s =>
if (game != null)
{
Sprite?.FadeOut();
Sprite?.Expire();
Sprite = s;
newSprite.LoadAsync(game, s =>
{
Sprite?.FadeOut();
Sprite?.Expire();
Sprite = s;
Add(s);
Add(s);
//todo: fix this... clock dependencies are a pain
if (s.Clock != null)
s.FadeInFromZero(200);
});
//todo: fix this... clock dependencies are a pain
if (s.Clock != null)
s.FadeInFromZero(200);
});
}
}
}