mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 16:13:57 +09:00
Don't dismiss toasts while hovered (and adjust timings slightly)
This commit is contained in:
@ -90,12 +90,20 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
toastFlow.Insert(depth, notification);
|
toastFlow.Insert(depth, notification);
|
||||||
|
|
||||||
pendingToastOperations.Add(Scheduler.AddDelayed(() =>
|
pendingToastOperations.Add(scheduleDismissal());
|
||||||
|
|
||||||
|
ScheduledDelegate scheduleDismissal() => Scheduler.AddDelayed(() =>
|
||||||
{
|
{
|
||||||
// add notification to permanent overlay unless it was already dismissed by the user.
|
// add notification to permanent overlay unless it was already dismissed by the user.
|
||||||
if (notification.WasClosed)
|
if (notification.WasClosed)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (notification.IsHovered)
|
||||||
|
{
|
||||||
|
pendingToastOperations.Add(scheduleDismissal());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
toastFlow.Remove(notification);
|
toastFlow.Remove(notification);
|
||||||
AddInternal(notification);
|
AddInternal(notification);
|
||||||
|
|
||||||
@ -107,7 +115,7 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
notification.FadeIn(300, Easing.OutQuint);
|
notification.FadeIn(300, Easing.OutQuint);
|
||||||
});
|
});
|
||||||
}, notification.IsImportant ? 15000 : 3000));
|
}, notification.IsImportant ? 12000 : 2500);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Update()
|
protected override void Update()
|
||||||
|
Reference in New Issue
Block a user