Move dangerous hold specification to base class

This commit is contained in:
Dean Herbert
2022-05-06 14:34:31 +09:00
parent 0d8e42b941
commit be960eb092
3 changed files with 43 additions and 38 deletions

View File

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