1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 20:23:00 +08:00

Merge pull request #22995 from Joehuu/fix-select-beatmap-keyboard-highlight

Fix select beatmap button not highlighting when creating a multiplayer room using keyboard
This commit is contained in:
Dean Herbert 2023-03-28 15:34:47 +09:00 committed by GitHub
commit 5c82d1f777
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,11 +73,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
private OsuSpriteText typeLabel = null!;
private LoadingLayer loadingLayer = null!;
public void SelectBeatmap()
{
if (matchSubScreen.IsCurrentScreen())
matchSubScreen.Push(new MultiplayerMatchSongSelect(matchSubScreen.Room));
}
public void SelectBeatmap() => selectBeatmapButton.TriggerClick();
[Resolved]
private MultiplayerMatchSubScreen matchSubScreen { get; set; } = null!;
@ -97,6 +93,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
private IDisposable? applyingSettingsOperation;
private Drawable playlistContainer = null!;
private DrawableRoomPlaylist drawablePlaylist = null!;
private RoundedButton selectBeatmapButton = null!;
public MatchSettings(Room room)
{
@ -275,12 +272,16 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
RelativeSizeAxes = Axes.X,
Height = DrawableRoomPlaylistItem.HEIGHT
},
new RoundedButton
selectBeatmapButton = new RoundedButton
{
RelativeSizeAxes = Axes.X,
Height = 40,
Text = "Select beatmap",
Action = SelectBeatmap
Action = () =>
{
if (matchSubScreen.IsCurrentScreen())
matchSubScreen.Push(new MultiplayerMatchSongSelect(matchSubScreen.Room));
}
}
}
}