mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Fix escape not always handling back action correctly at main menu (back button not yet visible).
This commit is contained in:
@ -85,7 +85,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
Children = new[]
|
Children = new[]
|
||||||
{
|
{
|
||||||
settingsButton = new Button(@"settings", @"options", FontAwesome.fa_gear, new Color4(85, 85, 85, 255), () => OnSettings?.Invoke(), -WEDGE_WIDTH, Key.O),
|
settingsButton = new Button(@"settings", @"options", FontAwesome.fa_gear, new Color4(85, 85, 85, 255), () => OnSettings?.Invoke(), -WEDGE_WIDTH, Key.O),
|
||||||
backButton = new Button(@"back", @"back", FontAwesome.fa_osu_left_o, new Color4(51, 58, 94, 255), onBack, -WEDGE_WIDTH, Key.Escape),
|
backButton = new Button(@"back", @"back", FontAwesome.fa_osu_left_o, new Color4(51, 58, 94, 255), onBack, -WEDGE_WIDTH),
|
||||||
iconFacade = new Container //need a container to make the osu! icon flow properly.
|
iconFacade = new Container //need a container to make the osu! icon flow properly.
|
||||||
{
|
{
|
||||||
Size = new Vector2(0, BUTTON_AREA_HEIGHT)
|
Size = new Vector2(0, BUTTON_AREA_HEIGHT)
|
||||||
@ -140,11 +140,18 @@ namespace osu.Game.Screens.Menu
|
|||||||
osuLogo.TriggerClick(state);
|
osuLogo.TriggerClick(state);
|
||||||
return true;
|
return true;
|
||||||
case Key.Escape:
|
case Key.Escape:
|
||||||
if (State == MenuState.Initial)
|
switch (State)
|
||||||
return false;
|
{
|
||||||
|
case MenuState.TopLevel:
|
||||||
|
State = MenuState.Initial;
|
||||||
|
return true;
|
||||||
|
case MenuState.Play:
|
||||||
|
State = MenuState.TopLevel;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
State = MenuState.Initial;
|
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user