mirror of
https://github.com/ppy/osu.git
synced 2025-01-19 15:02:54 +08:00
Move avatar user loading to BDL also
This commit is contained in:
parent
5e90b67be0
commit
dc2945f4f8
@ -23,9 +23,6 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
Precision = 0.01f
|
Precision = 0.01f
|
||||||
};
|
};
|
||||||
|
|
||||||
[Resolved]
|
|
||||||
private GameplayState gameplayState { get; set; } = null!;
|
|
||||||
|
|
||||||
private readonly UpdateableAvatar avatar;
|
private readonly UpdateableAvatar avatar;
|
||||||
|
|
||||||
private const float default_size = 80f;
|
private const float default_size = 80f;
|
||||||
@ -41,11 +38,16 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(GameplayState gameplayState)
|
||||||
|
{
|
||||||
|
avatar.User = gameplayState.Score.ScoreInfo.User;
|
||||||
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
avatar.User = gameplayState.Score.ScoreInfo.User;
|
|
||||||
CornerRadius.BindValueChanged(e => avatar.CornerRadius = e.NewValue * default_size, true);
|
CornerRadius.BindValueChanged(e => avatar.CornerRadius = e.NewValue * default_size, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user