Make exiting multiplayer a dangerous operation, requiring hold

This commit is contained in:
Dean Herbert
2022-05-03 16:06:04 +09:00
parent faeefc5e18
commit 2896612c5c
3 changed files with 30 additions and 9 deletions

View File

@ -12,6 +12,8 @@ namespace osu.Game.Overlays.Dialog
{
public class PopupDialogDangerousButton : PopupDialogButton
{
public const double DANGEROUS_HOLD_ACTIVATION_DELAY = 500;
private Box progressBox;
private DangerousConfirmContainer confirmContainer;
@ -42,7 +44,7 @@ namespace osu.Game.Overlays.Dialog
private class DangerousConfirmContainer : HoldToConfirmContainer
{
protected override double? HoldActivationDelay => 500;
protected override double? HoldActivationDelay => DANGEROUS_HOLD_ACTIVATION_DELAY;
protected override bool OnMouseDown(MouseDownEvent e)
{