1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

Handle bindable changes to fix new playlist creation not showing correct details

This commit is contained in:
Dean Herbert 2021-10-26 18:13:28 +09:00
parent 42d8d4fd38
commit c15bfb2cf4

View File

@ -37,6 +37,8 @@ namespace osu.Game.Screens.OnlinePlay.Playlists
private MatchLeaderboard leaderboard;
private SelectionPollingComponent selectionPollingComponent;
private FillFlowContainer progressSection;
public PlaylistsRoomSubScreen(Room room)
: base(room, false) // Editing is temporarily not allowed.
{
@ -67,6 +69,8 @@ namespace osu.Game.Screens.OnlinePlay.Playlists
Schedule(() => SelectedItem.Value = Room.Playlist.FirstOrDefault());
}
}, true);
Room.MaxAttempts.BindValueChanged(attempts => progressSection.Alpha = Room.MaxAttempts.Value != null ? 1 : 0, true);
}
protected override Drawable CreateMainContent() => new GridContainer
@ -154,11 +158,11 @@ namespace osu.Game.Screens.OnlinePlay.Playlists
},
new Drawable[]
{
new FillFlowContainer
progressSection = new FillFlowContainer
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Alpha = Room.MaxAttempts.Value != null ? 1 : 0,
Alpha = 0,
Margin = new MarginPadding { Bottom = 10 },
Direction = FillDirection.Vertical,
Children = new Drawable[]