mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 14:46:38 +09:00
Use Action<string>
for event OnChatMessageCommitted
& clear textbox internally
This commit is contained in:
@ -21,7 +21,7 @@ namespace osu.Game.Overlays.Chat
|
||||
{
|
||||
public readonly BindableBool ShowSearch = new BindableBool();
|
||||
|
||||
public event TextBox.OnCommitHandler? OnChatMessageCommit;
|
||||
public event Action<string>? OnChatMessageCommitted;
|
||||
|
||||
public event Action<string>? OnSearchTermsChanged;
|
||||
|
||||
@ -154,7 +154,9 @@ namespace osu.Game.Overlays.Chat
|
||||
private void chatTextBoxCommit(TextBox sender, bool newText)
|
||||
{
|
||||
if (!ShowSearch.Value)
|
||||
OnChatMessageCommit?.Invoke(sender, newText);
|
||||
OnChatMessageCommitted?.Invoke(sender.Text);
|
||||
|
||||
sender.Text = string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user