mirror of
https://github.com/ppy/osu
synced 2025-01-31 02:12:03 +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>
|
/// <summary>
|
||||||
/// Action that is invoked when <see cref="GlobalAction.Back"/> is triggered.
|
/// Action that is invoked when <see cref="GlobalAction.Back"/> is triggered.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected virtual Action BackAction => () => InternalButtons.Children.LastOrDefault()?.TriggerClick();
|
protected virtual Action BackAction => () => InternalButtons.LastOrDefault()?.TriggerClick();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Action that is invoked when <see cref="GlobalAction.Select"/> is triggered.
|
/// Action that is invoked when <see cref="GlobalAction.Select"/> is triggered.
|
||||||
|
@ -28,7 +28,7 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
private SkinnableSound pauseLoop;
|
private SkinnableSound pauseLoop;
|
||||||
|
|
||||||
protected override Action BackAction => () => InternalButtons.Children.First().TriggerClick();
|
protected override Action BackAction => () => InternalButtons.First().TriggerClick();
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
@ -64,7 +64,7 @@ namespace osu.Game.Screens.Play
|
|||||||
switch (e.Action)
|
switch (e.Action)
|
||||||
{
|
{
|
||||||
case GlobalAction.PauseGameplay:
|
case GlobalAction.PauseGameplay:
|
||||||
InternalButtons.Children.First().TriggerClick();
|
InternalButtons.First().TriggerClick();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user