1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 20:47:28 +08:00

Simplify TriggerClicks in gameplay menu overlays

This commit is contained in:
Joseph Madamba 2023-01-17 00:34:52 -08:00
parent 8f7cb18217
commit da0eb9b0cb
2 changed files with 3 additions and 3 deletions

View File

@ -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.

View File

@ -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;
}