mirror of
https://github.com/ppy/osu.git
synced 2026-05-13 19:54:15 +08:00
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 <pe@ppy.sh>
This commit is contained in:
committed by
GitHub
Unverified
parent
51b4e89773
commit
5fb87da37b
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user