1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-17 19:02:56 +08:00

Move some properties/bindables around

This commit is contained in:
Joseph Madamba 2024-07-27 17:26:31 -07:00
parent aed2b3c7c6
commit b5ff2dab43
2 changed files with 10 additions and 5 deletions

View File

@ -27,14 +27,14 @@ namespace osu.Game.Screens.Ranking
: base(false)
{
this.beatmapInfo = beatmapInfo;
Margin = new MarginPadding(5);
Body.CornerRadius = 4;
}
[BackgroundDependencyLoader]
private void load()
{
Margin = new MarginPadding(5);
Body.CornerRadius = 4;
Children = new[]
{
new OsuMenu(Direction.Vertical, true)

View File

@ -41,8 +41,6 @@ namespace osu.Game.Screens.Ranking
current = new BindableWithCurrent<BeatmapSetFavouriteState>(new BeatmapSetFavouriteState(false, 0));
Size = new Vector2(50, 30);
Action = toggleFavouriteStatus;
}
[BackgroundDependencyLoader]
@ -50,6 +48,13 @@ namespace osu.Game.Screens.Ranking
{
Add(loading = new LoadingLayer(true, false));
Action = toggleFavouriteStatus;
}
protected override void LoadComplete()
{
base.LoadComplete();
current.BindValueChanged(_ => updateState(), true);
localUser.BindTo(api.LocalUser);