From 5d77a5f9882be83e618f2346315ea269a4b558b4 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 17 Jul 2017 10:15:55 +0900 Subject: [PATCH] Allow closing profile by clicking basically anywhere --- osu.Game/Overlays/UserProfileOverlay.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/osu.Game/Overlays/UserProfileOverlay.cs b/osu.Game/Overlays/UserProfileOverlay.cs index df339ad23e..30cd061674 100644 --- a/osu.Game/Overlays/UserProfileOverlay.cs +++ b/osu.Game/Overlays/UserProfileOverlay.cs @@ -10,6 +10,7 @@ using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.UserInterface; +using osu.Framework.Input; using osu.Game.Graphics; using osu.Game.Graphics.Containers; using osu.Game.Graphics.UserInterface; @@ -33,6 +34,14 @@ public class UserProfileOverlay : WaveOverlayContainer public const float CONTENT_X_MARGIN = 50; + public override bool ReceiveMouseInputAt(Vector2 screenSpacePos) => true; + + protected override bool OnClick(InputState state) + { + State = Visibility.Hidden; + return true; + } + public UserProfileOverlay() { FirstWaveColour = OsuColour.Gray(0.4f);