mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 16:27:26 +08:00
Add method to PopupDialog
to press the first OK button
This commit is contained in:
parent
87833bfb61
commit
124ac689b8
@ -207,6 +207,11 @@ namespace osu.Game.Overlays.Dialog
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Programmatically clicks the first <see cref="PopupDialogOkButton"/>.
|
||||
/// </summary>
|
||||
public void PerformOkAction() => Buttons.OfType<PopupDialogOkButton>().First().Click();
|
||||
|
||||
protected override bool OnKeyDown(KeyDownEvent e)
|
||||
{
|
||||
if (e.Repeat) return false;
|
||||
|
Loading…
Reference in New Issue
Block a user