mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 11:12:54 +08:00
Ensure ChatTextBox
takes/leaves focus on chat overlay pop in/out
This commit is contained in:
parent
c17edb2848
commit
60999e83e0
@ -26,6 +26,10 @@ namespace osu.Game.Overlays.Chat
|
||||
|
||||
public event Action<string>? OnSearchTermsChanged;
|
||||
|
||||
public void TextBoxTakeFocus() => chatTextBox.TakeFocus();
|
||||
|
||||
public void TextBoxKillFocus() => chatTextBox.KillFocus();
|
||||
|
||||
[Resolved]
|
||||
private Bindable<Channel> currentChannel { get; set; } = null!;
|
||||
|
||||
|
@ -214,16 +214,22 @@ namespace osu.Game.Overlays
|
||||
|
||||
protected override void PopIn()
|
||||
{
|
||||
base.PopIn();
|
||||
|
||||
this.MoveToY(0, transition_length, Easing.OutQuint);
|
||||
this.FadeIn(transition_length, Easing.OutQuint);
|
||||
base.PopIn();
|
||||
|
||||
textBar.TextBoxTakeFocus();
|
||||
}
|
||||
|
||||
protected override void PopOut()
|
||||
{
|
||||
base.PopOut();
|
||||
|
||||
this.MoveToY(Height, transition_length, Easing.InSine);
|
||||
this.FadeOut(transition_length, Easing.InSine);
|
||||
base.PopOut();
|
||||
|
||||
textBar.TextBoxKillFocus();
|
||||
}
|
||||
|
||||
private void currentChannelChanged(ValueChangedEvent<Channel> e)
|
||||
|
Loading…
Reference in New Issue
Block a user