From 5fb87da37b1708ed49bb66a6ae6a90185d0dc0e8 Mon Sep 17 00:00:00 2001 From: Anthony Berg Date: Tue, 5 May 2026 10:02:57 +0200 Subject: [PATCH] Synchronise ranked play text box with gameplay text box (#37630) I am not sure if it was intentionally not included, but with quick play the unsent text input would be transferred to the gameplay state. This video shows how it currently acts: https://github.com/user-attachments/assets/03bc42cd-65fc-403a-a9f6-1739ba38855a But I have used some of the logic in the `channelChanged` function from `StandAloneChatDisplay`, and managed to get the text boxes to synchronise in the gameplay state. https://github.com/user-attachments/assets/f70745ad-9ce2-44a4-a50d-7b28d63414b7 --------- Co-authored-by: Dean Herbert --- .../RankedPlay/Components/RankedPlayChatDisplay.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/osu.Game/Screens/OnlinePlay/Matchmaking/RankedPlay/Components/RankedPlayChatDisplay.cs b/osu.Game/Screens/OnlinePlay/Matchmaking/RankedPlay/Components/RankedPlayChatDisplay.cs index 2ef1a5cc58..0f39863e62 100644 --- a/osu.Game/Screens/OnlinePlay/Matchmaking/RankedPlay/Components/RankedPlayChatDisplay.cs +++ b/osu.Game/Screens/OnlinePlay/Matchmaking/RankedPlay/Components/RankedPlayChatDisplay.cs @@ -91,8 +91,13 @@ namespace osu.Game.Screens.OnlinePlay.Matchmaking.RankedPlay.Components textbox.OnCommit += onCommit; channel = channelManager?.JoinChannel(new Channel { Id = room.ChannelID, Type = ChannelType.Multiplayer, Name = $"#lazermp_{room.RoomID}" }); + if (channel != null) + { channel.NewMessagesArrived += onNewMessagesArrived; + + textbox.Current.BindTo(channel.TextBoxMessage); + } } private void onCommit(TextBox sender, bool newText) @@ -186,7 +191,10 @@ namespace osu.Game.Screens.OnlinePlay.Matchmaking.RankedPlay.Components base.Dispose(isDisposing); if (channel != null) + { channel.NewMessagesArrived -= onNewMessagesArrived; + textbox.Current.UnbindFrom(channel.TextBoxMessage); + } } private partial class ChatTextBox : StandAloneChatDisplay.ChatTextBox