mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 21:02:55 +08:00
Add ability to abort dangerous dialog button on hover lost
This commit is contained in:
parent
65bb3a5cad
commit
d30d054b4c
@ -102,7 +102,7 @@ namespace osu.Game.Graphics.Containers
|
||||
/// </summary>
|
||||
protected void AbortConfirm()
|
||||
{
|
||||
if (!AllowMultipleFires && Fired) return;
|
||||
if (!confirming || (!AllowMultipleFires && Fired)) return;
|
||||
|
||||
confirming = false;
|
||||
Fired = false;
|
||||
|
@ -95,6 +95,16 @@ namespace osu.Game.Overlays.Dialog
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnHoverLost(HoverLostEvent e)
|
||||
{
|
||||
base.OnHoverLost(e);
|
||||
|
||||
if (!e.HasAnyButtonPressed) return;
|
||||
|
||||
lowPassFilter.CutoffTo(AudioFilter.MAX_LOWPASS_CUTOFF);
|
||||
AbortConfirm();
|
||||
}
|
||||
|
||||
private void progressChanged(ValueChangedEvent<double> progress)
|
||||
{
|
||||
if (progress.NewValue < progress.OldValue) return;
|
||||
|
Loading…
Reference in New Issue
Block a user