mirror of
https://github.com/ppy/osu.git
synced 2025-03-22 22:29:28 +08:00
Hide the login overlay when the user panel container by it is clicked
This commit is contained in:
parent
d1a5a042d7
commit
b13e8599f1
@ -46,6 +46,7 @@ namespace osu.Game.Overlays
|
||||
settingsSection = new LoginSettings
|
||||
{
|
||||
Padding = new MarginPadding(10),
|
||||
RequestHide = Hide,
|
||||
},
|
||||
new Box
|
||||
{
|
||||
|
@ -1,6 +1,7 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
@ -31,6 +32,11 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
||||
private UserPanel panel;
|
||||
private UserDropdown dropdown;
|
||||
|
||||
/// <summary>
|
||||
/// Called to request a hide of a parent displaying this container.
|
||||
/// </summary>
|
||||
public Action RequestHide;
|
||||
|
||||
public override RectangleF BoundingBox => bounding ? base.BoundingBox : RectangleF.Empty;
|
||||
|
||||
public bool Bounding
|
||||
@ -58,6 +64,7 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
||||
{
|
||||
this.inputManager = inputManager;
|
||||
this.colours = colours;
|
||||
|
||||
api?.Register(this);
|
||||
}
|
||||
|
||||
@ -129,7 +136,11 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
||||
},
|
||||
},
|
||||
},
|
||||
panel = new UserPanel(api.LocalUser.Value) { RelativeSizeAxes = Axes.X },
|
||||
panel = new UserPanel(api.LocalUser.Value)
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Action = RequestHide
|
||||
},
|
||||
dropdown = new UserDropdown { RelativeSizeAxes = Axes.X },
|
||||
},
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user