mirror of
https://github.com/osukey/osukey.git
synced 2025-06-08 12:58:01 +09:00
Fixed typo, made mod select take focus when visible
This commit is contained in:
parent
d82b67ee9b
commit
d1af050355
@ -15,6 +15,9 @@ using osu.Game.Graphics.Backgrounds;
|
|||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Game.Modes;
|
using osu.Game.Modes;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Input;
|
||||||
|
using OpenTK.Input;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Mods
|
namespace osu.Game.Overlays.Mods
|
||||||
{
|
{
|
||||||
@ -84,6 +87,28 @@ namespace osu.Game.Overlays.Mods
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override bool RequestingFocus => State == Visibility.Visible;
|
||||||
|
|
||||||
|
protected override bool OnFocus(InputState state) => true;
|
||||||
|
protected override void OnFocusLost(InputState state)
|
||||||
|
{
|
||||||
|
if (state.Keyboard.Keys.Contains(Key.Escape))
|
||||||
|
Hide();
|
||||||
|
base.OnFocusLost(state);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void PopIn()
|
||||||
|
{
|
||||||
|
base.PopIn();
|
||||||
|
Schedule(TriggerFocusContention);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void PopOut()
|
||||||
|
{
|
||||||
|
base.PopOut();
|
||||||
|
TriggerFocusLost();
|
||||||
|
}
|
||||||
|
|
||||||
protected override void TransitionIn()
|
protected override void TransitionIn()
|
||||||
{
|
{
|
||||||
rankedMultiplerContainer.MoveToX(0, ranked_multiplier_duration, EasingTypes.OutQuint);
|
rankedMultiplerContainer.MoveToX(0, ranked_multiplier_duration, EasingTypes.OutQuint);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user