mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 06:42:54 +08:00
Fix textbox focus issues (and inability to use escape).
This commit is contained in:
parent
c1d0aea217
commit
a1f341a64f
@ -13,6 +13,7 @@ using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Screens.Select;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using System;
|
||||
|
||||
namespace osu.Game.Overlays.Music
|
||||
{
|
||||
@ -35,6 +36,7 @@ namespace osu.Game.Overlays.Music
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Height = 40,
|
||||
Exit = () => ExitRequested?.Invoke(),
|
||||
},
|
||||
new CollectionsDropdown<PlaylistCollection>
|
||||
{
|
||||
@ -46,6 +48,8 @@ namespace osu.Game.Overlays.Music
|
||||
};
|
||||
}
|
||||
|
||||
public Action ExitRequested;
|
||||
|
||||
public class FilterTextBox : SearchTextBox
|
||||
{
|
||||
protected override Color4 BackgroundUnfocused => OsuColour.FromHex(@"222222");
|
||||
|
@ -73,13 +73,14 @@ namespace osu.Game.Overlays.Music
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
ExitRequested = () => State = Visibility.Hidden,
|
||||
Padding = new MarginPadding(10),
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
|
||||
list.BeatmapSets = BeatmapSets = beatmaps.GetAllWithChildren<BeatmapSetInfo>().ToList();
|
||||
|
||||
beatmapBacking.BindTo(game.Beatmap);
|
||||
@ -95,7 +96,7 @@ namespace osu.Game.Overlays.Music
|
||||
protected override void PopIn()
|
||||
{
|
||||
filter.Search.HoldFocus = true;
|
||||
filter.Search.TriggerFocus();
|
||||
Schedule(() => filter.Search.TriggerFocus());
|
||||
|
||||
ResizeTo(new Vector2(1, playlist_height), transition_duration, EasingTypes.OutQuint);
|
||||
FadeIn(transition_duration, EasingTypes.OutQuint);
|
||||
@ -104,7 +105,6 @@ namespace osu.Game.Overlays.Music
|
||||
protected override void PopOut()
|
||||
{
|
||||
filter.Search.HoldFocus = false;
|
||||
filter.Search.TriggerFocusLost();
|
||||
|
||||
ResizeTo(new Vector2(1, 0), transition_duration, EasingTypes.OutQuint);
|
||||
FadeOut(transition_duration);
|
||||
|
Loading…
Reference in New Issue
Block a user