1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 12:45:09 +08:00

Hide toolbar forever when the user hides it

This commit is contained in:
Joehu 2020-11-09 14:46:08 -08:00
parent 6c0734a09f
commit 62f2a823f6
3 changed files with 9 additions and 2 deletions

View File

@ -983,7 +983,7 @@ namespace osu.Game
if (newOsuScreen.HideOverlaysOnEnter)
CloseAllOverlays();
else
else if (!Toolbar.HiddenByUser)
Toolbar.Show();
if (newOsuScreen.AllowBackButton)

View File

@ -23,6 +23,8 @@ namespace osu.Game.Overlays.Toolbar
public const float HEIGHT = 40;
public const float TOOLTIP_HEIGHT = 30;
public bool HiddenByUser;
public Action OnHome;
private ToolbarUserButton userButton;
@ -169,10 +171,14 @@ namespace osu.Game.Overlays.Toolbar
public bool OnPressed(GlobalAction action)
{
if (OverlayActivationMode.Value == OverlayActivation.Disabled)
return false;
switch (action)
{
case GlobalAction.ToggleToolbar:
ToggleVisibility();
HiddenByUser = State.Value == Visibility.Hidden;
return true;
}

View File

@ -352,7 +352,8 @@ namespace osu.Game.Screens.Menu
if (impact)
logo.Impact();
game?.Toolbar.Show();
if (game?.Toolbar.HiddenByUser == false)
game.Toolbar.Show();
}, 200);
break;