Skip to content

Commit 29b3079

Browse files
committed
Show multiplayer/playlist header content inside title wedge
Closes ppy#37077.
1 parent 021e448 commit 29b3079

File tree

4 files changed

+14
-6
lines changed

4 files changed

+14
-6
lines changed

osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerMatchSongSelect.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public MultiplayerMatchSongSelect(Room room, PlaylistItem? itemToEdit = null)
8383
initialItem = itemToEdit ?? room.Playlist.LastOrDefault();
8484

8585
Padding = new MarginPadding { Horizontal = HORIZONTAL_OVERFLOW_PADDING };
86-
LeftPadding = new MarginPadding { Top = CORNER_RADIUS_HIDE_OFFSET + Header.HEIGHT };
86+
TopPadding = Header.HEIGHT - 10;
8787

8888
freeModSelect = new FreeModSelectOverlay
8989
{

osu.Game/Screens/OnlinePlay/Playlists/PlaylistsSongSelect.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public PlaylistsSongSelect(Room room)
5151
ShowOsuLogo = false;
5252

5353
Padding = new MarginPadding { Horizontal = HORIZONTAL_OVERFLOW_PADDING };
54-
LeftPadding = new MarginPadding { Top = CORNER_RADIUS_HIDE_OFFSET + Header.HEIGHT };
54+
TopPadding = Header.HEIGHT - 10;
5555

5656
addToPlaylistFooterButton = new AddToPlaylistFooterButton
5757
{

osu.Game/Screens/Select/BeatmapTitleWedge.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ public partial class BeatmapTitleWedge : VisibilityContainer
4646
[Resolved]
4747
private IBindable<SongSelect.BeatmapSetLookupResult?> onlineLookupResult { get; set; } = null!;
4848

49+
public float TopPadding { get; init; }
50+
4951
protected override bool StartHidden => true;
5052

5153
private ModSettingChangeTracker? settingChangeTracker;
@@ -97,7 +99,7 @@ private void load()
9799
Direction = FillDirection.Vertical,
98100
Padding = new MarginPadding
99101
{
100-
Top = SongSelect.WEDGE_CONTENT_MARGIN,
102+
Top = SongSelect.WEDGE_CONTENT_MARGIN + TopPadding,
101103
Left = SongSelect.WEDGE_CONTENT_MARGIN
102104
},
103105
Spacing = new Vector2(0f, 4f),

osu.Game/Screens/Select/SongSelect.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,11 @@ public abstract partial class SongSelect : ScreenWithBeatmapBackground, IKeyBind
9999
/// </summary>
100100
protected bool ShowOsuLogo { get; init; } = true;
101101

102-
protected MarginPadding LeftPadding { get; init; }
102+
/// <summary>
103+
/// Additional padding to be added to the title wedge.
104+
/// Generally set to show external content in this space.
105+
/// </summary>
106+
public float TopPadding { get; init; }
103107

104108
private ModSelectOverlay modSelectOverlay = null!;
105109
private ModSpeedHotkeyHandler modSpeedHotkeyHandler = null!;
@@ -233,10 +237,12 @@ private void load(AudioManager audio, OsuConfigManager config)
233237
RelativeSizeAxes = Axes.Both,
234238
Spacing = new Vector2(0f, 4f),
235239
Direction = FillDirection.Vertical,
236-
Padding = LeftPadding,
237240
Children = new Drawable[]
238241
{
239-
new ShearAligningWrapper(titleWedge = new BeatmapTitleWedge()),
242+
new ShearAligningWrapper(titleWedge = new BeatmapTitleWedge
243+
{
244+
TopPadding = TopPadding,
245+
}),
240246
new ShearAligningWrapper(detailsArea = new BeatmapDetailsArea()),
241247
},
242248
},

0 commit comments

Comments
 (0)