mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Allow top-level menu key pressed to progress the osu! logo
This commit is contained in:
@ -31,6 +31,8 @@ namespace osu.Game.Screens.Menu
|
||||
{
|
||||
public event Action<ButtonState> StateChanged;
|
||||
|
||||
public readonly Key TriggerKey;
|
||||
|
||||
private readonly Container iconText;
|
||||
private readonly Container box;
|
||||
private readonly Box boxHoverLayer;
|
||||
@ -43,7 +45,6 @@ namespace osu.Game.Screens.Menu
|
||||
public ButtonSystemState VisibleState = ButtonSystemState.TopLevel;
|
||||
|
||||
private readonly Action clickAction;
|
||||
private readonly Key triggerKey;
|
||||
private SampleChannel sampleClick;
|
||||
private SampleChannel sampleHover;
|
||||
|
||||
@ -53,7 +54,7 @@ namespace osu.Game.Screens.Menu
|
||||
{
|
||||
this.sampleName = sampleName;
|
||||
this.clickAction = clickAction;
|
||||
this.triggerKey = triggerKey;
|
||||
TriggerKey = triggerKey;
|
||||
|
||||
AutoSizeAxes = Axes.Both;
|
||||
Alpha = 0;
|
||||
@ -210,7 +211,7 @@ namespace osu.Game.Screens.Menu
|
||||
if (e.Repeat || e.ControlPressed || e.ShiftPressed || e.AltPressed)
|
||||
return false;
|
||||
|
||||
if (triggerKey == e.Key && triggerKey != Key.Unknown)
|
||||
if (TriggerKey == e.Key && TriggerKey != Key.Unknown)
|
||||
{
|
||||
trigger();
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user