From af20bbba4ee136a3ef7bbd4f8300ccb9153cd09e Mon Sep 17 00:00:00 2001 From: Dao Heng Liu Date: Thu, 25 Sep 2025 22:55:16 +0200 Subject: [PATCH] add chat channel ID to lobby information display --- .../Multiplayer/MultiplayerMatchSubScreen.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerMatchSubScreen.cs b/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerMatchSubScreen.cs index dbbb285e40..ecc35dbee0 100644 --- a/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerMatchSubScreen.cs +++ b/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerMatchSubScreen.cs @@ -25,6 +25,7 @@ using osu.Game.Configuration; using osu.Game.Graphics.Containers; using osu.Game.Graphics.Cursor; +using osu.Game.Graphics.Sprites; using osu.Game.Online; using osu.Game.Online.API.Requests.Responses; using osu.Game.Online.API; @@ -261,6 +262,7 @@ public partial class MultiplayerMatchSubScreen : OnlinePlaySubScreen, IPreviewTr public override string ShortTitle => "room"; private LinkFlowContainer linkFlowContainer = null!; + private OsuSpriteText channelIdText = null!; private StandAloneChatDisplay chatDisplay = null!; public override bool? ApplyModTrackAdjustments => true; @@ -473,7 +475,14 @@ private void load() Content = new[] { new Drawable[] { new OverlinedHeader("Lobby ID") }, - new Drawable[] { linkFlowContainer = new LinkFlowContainer { Height = 24, AutoSizeAxes = Axes.X } }, + new Drawable[] + { + linkFlowContainer = new LinkFlowContainer { Height = 24, AutoSizeAxes = Axes.X }, + }, + new Drawable[] + { + channelIdText = new OsuSpriteText { Height = 24, Text = @"Loading chat..." }, + }, new Drawable[] { new ParticipantsListHeader() @@ -694,6 +703,11 @@ protected override void LoadComplete() userModsSelectOverlayRegistration = overlayManager?.RegisterBlockingOverlay(userModsSelectOverlay); + chatDisplay.Channel.BindValueChanged(channel => + { + channelIdText.Text = $@"Chat channel ID: {channel.NewValue?.Id ?? 0}"; + }); + Beatmap.BindValueChanged(vce => { Scheduler.Add(() =>