1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-06 09:47:22 +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) : base(false)
{ {
this.beatmapInfo = beatmapInfo; this.beatmapInfo = beatmapInfo;
Margin = new MarginPadding(5);
Body.CornerRadius = 4;
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load() private void load()
{ {
Margin = new MarginPadding(5);
Body.CornerRadius = 4;
Children = new[] Children = new[]
{ {
new OsuMenu(Direction.Vertical, true) new OsuMenu(Direction.Vertical, true)

View File

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