Add OnFocus handler to CurrentlyPlayingDisplay

This commit is contained in:
sw1tchbl4d3
2022-05-28 12:04:25 +02:00
parent cd84200ad9
commit ede3ab9dc0
2 changed files with 10 additions and 0 deletions

View File

@ -11,6 +11,7 @@ using osu.Framework.Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.Events;
using osu.Framework.Localisation;
using osu.Framework.Screens;
using osu.Game.Database;
@ -98,6 +99,13 @@ namespace osu.Game.Overlays.Dashboard
playingUsers.BindCollectionChanged(onPlayingUsersChanged, true);
}
protected override void OnFocus(FocusEvent e)
{
base.OnFocus(e);
searchTextBox.TakeFocus();
}
private void onPlayingUsersChanged(object sender, NotifyCollectionChangedEventArgs e) => Schedule(() =>
{
switch (e.Action)

View File

@ -16,6 +16,8 @@ namespace osu.Game.Overlays
protected override DashboardOverlayHeader CreateHeader() => new DashboardOverlayHeader();
public override bool AcceptsFocus => false;
protected override void CreateDisplayToLoad(DashboardOverlayTabs tab)
{
switch (tab)