Force beatmap listing overlay's textbox back on screen when a key is pressed

Not the cleanest solution, but works for now. Will eventually be
replaced after the header is updated to reflect the latest designs
(which keeps it on screen in all cases).

Closes https://github.com/ppy/osu/issues/10703.
This commit is contained in:
Dean Herbert
2020-11-10 16:26:30 +09:00
parent c8917d1236
commit a2ef3aa21a
3 changed files with 35 additions and 1 deletions

View File

@ -68,6 +68,7 @@ namespace osu.Game.Overlays
Header,
filterControl = new BeatmapListingFilterControl
{
TypingStarted = onTypingStarted,
SearchStarted = onSearchStarted,
SearchFinished = onSearchFinished,
},
@ -102,6 +103,12 @@ namespace osu.Game.Overlays
};
}
private void onTypingStarted()
{
// temporary until the textbox/header is updated to always stay on screen.
resultScrollContainer.ScrollToStart();
}
protected override void OnFocus(FocusEvent e)
{
base.OnFocus(e);