mirror of https://github.com/ppy/osu
Ensure `ChatTextBox` takes/leaves focus on chat overlay pop in/out
This commit is contained in:
parent
c17edb2848
commit
60999e83e0
|
@ -26,6 +26,10 @@ public class ChatTextBar : Container
|
|||
|
||||
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 @@ protected override void OnDragEnd(DragEndEvent e)
|
|||
|
||||
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