mirror of
https://github.com/ppy/osu
synced 2025-01-18 12:00:58 +00:00
Simplify TriggerClick
s in gameplay menu overlays
This commit is contained in:
parent
8f7cb18217
commit
da0eb9b0cb
@ -44,7 +44,7 @@ namespace osu.Game.Screens.Play
|
||||
/// <summary>
|
||||
/// Action that is invoked when <see cref="GlobalAction.Back"/> is triggered.
|
||||
/// </summary>
|
||||
protected virtual Action BackAction => () => InternalButtons.Children.LastOrDefault()?.TriggerClick();
|
||||
protected virtual Action BackAction => () => InternalButtons.LastOrDefault()?.TriggerClick();
|
||||
|
||||
/// <summary>
|
||||
/// Action that is invoked when <see cref="GlobalAction.Select"/> is triggered.
|
||||
|
@ -28,7 +28,7 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
private SkinnableSound pauseLoop;
|
||||
|
||||
protected override Action BackAction => () => InternalButtons.Children.First().TriggerClick();
|
||||
protected override Action BackAction => () => InternalButtons.First().TriggerClick();
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
@ -64,7 +64,7 @@ namespace osu.Game.Screens.Play
|
||||
switch (e.Action)
|
||||
{
|
||||
case GlobalAction.PauseGameplay:
|
||||
InternalButtons.Children.First().TriggerClick();
|
||||
InternalButtons.First().TriggerClick();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user