Allow closing profile by clicking basically anywhere

This commit is contained in:
Dean Herbert 2017-07-17 10:15:55 +09:00
parent 26b36c08a3
commit 5d77a5f988
1 changed files with 9 additions and 0 deletions

View File

@ -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);