mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 01:52:55 +08:00
Fix beatmap listing overlay not hiding via keyboard control when scrolled
Closes https://github.com/ppy/osu/issues/14684.
This commit is contained in:
parent
2e00c71842
commit
c101d1f205
@ -70,7 +70,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
return base.OnKeyDown(e);
|
||||
}
|
||||
|
||||
public bool OnPressed(GlobalAction action)
|
||||
public virtual bool OnPressed(GlobalAction action)
|
||||
{
|
||||
if (!HasFocus) return false;
|
||||
|
||||
|
@ -3,21 +3,22 @@
|
||||
|
||||
using System;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osuTK;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Game.Beatmaps.Drawables;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Beatmaps.Drawables;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Input.Bindings;
|
||||
using osu.Game.Resources.Localisation.Web;
|
||||
using osuTK.Graphics;
|
||||
using osu.Game.Rulesets;
|
||||
using osu.Game.Scoring;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Overlays.BeatmapListing
|
||||
{
|
||||
@ -117,7 +118,7 @@ namespace osu.Game.Overlays.BeatmapListing
|
||||
textBox = new BeatmapSearchTextBox
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
TypingStarted = () => TypingStarted?.Invoke(),
|
||||
TextChanged = () => TypingStarted?.Invoke(),
|
||||
},
|
||||
new ReverseChildIDFillFlowContainer<Drawable>
|
||||
{
|
||||
@ -167,7 +168,7 @@ namespace osu.Game.Overlays.BeatmapListing
|
||||
/// <summary>
|
||||
/// Any time the text box receives key events (even while masked).
|
||||
/// </summary>
|
||||
public Action TypingStarted;
|
||||
public Action TextChanged;
|
||||
|
||||
protected override Color4 SelectionColour => Color4.Gray;
|
||||
|
||||
@ -181,7 +182,16 @@ namespace osu.Game.Overlays.BeatmapListing
|
||||
if (!base.OnKeyDown(e))
|
||||
return false;
|
||||
|
||||
TypingStarted?.Invoke();
|
||||
TextChanged?.Invoke();
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool OnPressed(GlobalAction action)
|
||||
{
|
||||
if (!base.OnPressed(action))
|
||||
return false;
|
||||
|
||||
TextChanged?.Invoke();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user