mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Add ability to abort dangerous dialog button on hover lost
This commit is contained in:
@ -102,7 +102,7 @@ namespace osu.Game.Graphics.Containers
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
protected void AbortConfirm()
|
protected void AbortConfirm()
|
||||||
{
|
{
|
||||||
if (!AllowMultipleFires && Fired) return;
|
if (!confirming || (!AllowMultipleFires && Fired)) return;
|
||||||
|
|
||||||
confirming = false;
|
confirming = false;
|
||||||
Fired = 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)
|
private void progressChanged(ValueChangedEvent<double> progress)
|
||||||
{
|
{
|
||||||
if (progress.NewValue < progress.OldValue) return;
|
if (progress.NewValue < progress.OldValue) return;
|
||||||
|
Reference in New Issue
Block a user