Trigger test via button click when using keyboard shortcut

This commit is contained in:
Dean Herbert 2021-11-12 14:42:33 +09:00
parent 62600f1390
commit 54ae307a3d

View File

@ -91,6 +91,8 @@ namespace osu.Game.Screens.Edit
private DependencyContainer dependencies; private DependencyContainer dependencies;
private TestGameplayButton testGameplayButton;
private bool isNewBeatmap; private bool isNewBeatmap;
protected override UserActivity InitialActivity => new UserActivity.Editing(Beatmap.Value.BeatmapInfo); protected override UserActivity InitialActivity => new UserActivity.Editing(Beatmap.Value.BeatmapInfo);
@ -289,7 +291,7 @@ namespace osu.Game.Screens.Edit
Padding = new MarginPadding { Left = 10 }, Padding = new MarginPadding { Left = 10 },
Child = new PlaybackControl { RelativeSizeAxes = Axes.Both }, Child = new PlaybackControl { RelativeSizeAxes = Axes.Both },
}, },
new TestGameplayButton testGameplayButton = new TestGameplayButton
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding { Left = 10 }, Padding = new MarginPadding { Left = 10 },
@ -469,7 +471,7 @@ namespace osu.Game.Screens.Edit
return true; return true;
case GlobalAction.EditorTestGameplay: case GlobalAction.EditorTestGameplay:
testGameplay(); testGameplayButton.TriggerClick();
return true; return true;
default: default: