1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 10:18:22 +08:00

Move Hide() to OsuGame

This commit is contained in:
Andrew Hong 2022-08-10 13:31:58 -04:00
parent 6f1fdd4c34
commit 396860d9e8
2 changed files with 9 additions and 16 deletions

View File

@ -1140,10 +1140,16 @@ namespace osu.Game
case GlobalAction.ToggleProfile:
if (userProfile.State.Value == Visibility.Visible)
return false;
{
userProfile.Hide();
return true;
}
ShowUser(new APIUser { Id = API.LocalUser.Value.Id });
return true;
else
{
ShowUser(new APIUser { Id = API.LocalUser.Value.Id });
return true;
}
case GlobalAction.RandomSkin:
// Don't allow random skin selection while in the skin editor.

View File

@ -19,7 +19,6 @@ using osu.Game.Overlays.Profile.Sections;
using osu.Game.Users;
using osuTK;
using osuTK.Graphics;
using osu.Game.Input.Bindings;
namespace osu.Game.Overlays
{
@ -42,18 +41,6 @@ namespace osu.Game.Overlays
protected override Color4 BackgroundColour => ColourProvider.Background6;
public override bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
{
switch (e.Action)
{
case GlobalAction.ToggleProfile:
Hide();
return true;
}
return base.OnPressed(e);
}
public void ShowUser(IUser user)
{
if (user.OnlineID == APIUser.SYSTEM_USER_ID)