Replace large "show results" button with embedded button each playlist item

This commit is contained in:
Dean Herbert
2020-07-10 19:37:27 +09:00
parent 63f42c5502
commit 9556166c1b
3 changed files with 103 additions and 40 deletions

View File

@ -11,7 +11,6 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Screens;
using osu.Game.Audio;
using osu.Game.Beatmaps;
using osu.Game.Graphics.UserInterface;
using osu.Game.Online.API;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Multiplayer.GameTypes;
@ -137,30 +136,23 @@ namespace osu.Game.Screens.Multi.Match
new Drawable[] { new OverlinedHeader("Playlist"), },
new Drawable[]
{
new DrawableRoomPlaylist(false, true) // Temporarily always allow selection
new DrawableRoomPlaylistWithResults
{
RelativeSizeAxes = Axes.Both,
Items = { BindTarget = playlist },
SelectedItem = { BindTarget = SelectedItem }
SelectedItem = { BindTarget = SelectedItem },
RequestShowResults = item =>
{
Debug.Assert(roomId.Value != null);
multiplayer?.Push(new TimeshiftResultsScreen(null, roomId.Value.Value, item, false));
}
}
},
null,
new Drawable[]
{
new TriangleButton
{
RelativeSizeAxes = Axes.X,
Text = "Show beatmap results",
Action = showBeatmapResults
}
}
},
RowDimensions = new[]
{
new Dimension(GridSizeMode.AutoSize),
new Dimension(),
new Dimension(GridSizeMode.Absolute, 5),
new Dimension(GridSizeMode.AutoSize)
}
}
},
@ -296,11 +288,5 @@ namespace osu.Game.Screens.Multi.Match
break;
}
}
private void showBeatmapResults()
{
Debug.Assert(roomId.Value != null);
multiplayer?.Push(new TimeshiftResultsScreen(null, roomId.Value.Value, SelectedItem.Value, false));
}
}
}