mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 14:46:38 +09:00
Add better click-to-dismiss logic for sheared overlays
This commit is contained in:
@ -5,6 +5,8 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
|
||||
@ -88,7 +90,7 @@ namespace osu.Game.Overlays.Mods
|
||||
Bottom = footer_height + PADDING,
|
||||
}
|
||||
},
|
||||
Footer = new Container
|
||||
Footer = new InputBlockingContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Depth = float.MinValue,
|
||||
@ -113,6 +115,17 @@ namespace osu.Game.Overlays.Mods
|
||||
};
|
||||
}
|
||||
|
||||
protected override bool OnClick(ClickEvent e)
|
||||
{
|
||||
if (State.Value == Visibility.Visible)
|
||||
{
|
||||
Hide();
|
||||
return true;
|
||||
}
|
||||
|
||||
return base.OnClick(e);
|
||||
}
|
||||
|
||||
protected override void PopIn()
|
||||
{
|
||||
const double fade_in_duration = 400;
|
||||
|
Reference in New Issue
Block a user