From c1081e02b23221409ee2cbe5c04c0b829f904e14 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 25 Sep 2017 23:35:40 +0800 Subject: [PATCH] Close beatmap overlay on stray mouse clicks --- osu.Game/Overlays/BeatmapSetOverlay.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/osu.Game/Overlays/BeatmapSetOverlay.cs b/osu.Game/Overlays/BeatmapSetOverlay.cs index 6915523975..8e28ad33c5 100644 --- a/osu.Game/Overlays/BeatmapSetOverlay.cs +++ b/osu.Game/Overlays/BeatmapSetOverlay.cs @@ -7,6 +7,7 @@ using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; +using osu.Framework.Input; using osu.Game.Beatmaps; using osu.Game.Graphics; using osu.Game.Graphics.Containers; @@ -83,6 +84,12 @@ namespace osu.Game.Overlays FadeEdgeEffectTo(0, DISAPPEAR_DURATION, Easing.Out); } + protected override bool OnClick(InputState state) + { + State = Visibility.Hidden; + return true; + } + public void ShowBeatmapSet(BeatmapSetInfo set) { header.BeatmapSet = info.BeatmapSet = set;