mirror of
https://github.com/osukey/osukey.git
synced 2025-05-21 21:47:31 +09:00
Wrap main content of DrawableRoom
This commit is contained in:
parent
037b9cfb59
commit
bebb9d7e67
@ -43,6 +43,8 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
|
|||||||
private PasswordProtectedIcon passwordIcon;
|
private PasswordProtectedIcon passwordIcon;
|
||||||
private EndDateInfo endDateInfo;
|
private EndDateInfo endDateInfo;
|
||||||
|
|
||||||
|
private DelayedLoadWrapper wrapper;
|
||||||
|
|
||||||
public DrawableRoom(Room room)
|
public DrawableRoom(Room room)
|
||||||
{
|
{
|
||||||
Room = room;
|
Room = room;
|
||||||
@ -75,6 +77,7 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
|
|||||||
{
|
{
|
||||||
d.RelativeSizeAxes = Axes.Both;
|
d.RelativeSizeAxes = Axes.Both;
|
||||||
}),
|
}),
|
||||||
|
wrapper = new DelayedLoadWrapper(() =>
|
||||||
new Container
|
new Container
|
||||||
{
|
{
|
||||||
Name = @"Room content",
|
Name = @"Room content",
|
||||||
@ -223,7 +226,7 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
|
|||||||
passwordIcon = new PasswordProtectedIcon { Alpha = 0 }
|
passwordIcon = new PasswordProtectedIcon { Alpha = 0 }
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
}, 0)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -231,6 +234,8 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
|
|||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
|
wrapper.DelayedLoadComplete += _ =>
|
||||||
|
{
|
||||||
roomCategory.BindTo(Room.Category);
|
roomCategory.BindTo(Room.Category);
|
||||||
roomCategory.BindValueChanged(c =>
|
roomCategory.BindValueChanged(c =>
|
||||||
{
|
{
|
||||||
@ -248,6 +253,7 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
|
|||||||
|
|
||||||
hasPassword.BindTo(Room.HasPassword);
|
hasPassword.BindTo(Room.HasPassword);
|
||||||
hasPassword.BindValueChanged(v => passwordIcon.Alpha = v.NewValue ? 1 : 0, true);
|
hasPassword.BindValueChanged(v => passwordIcon.Alpha = v.NewValue ? 1 : 0, true);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user