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:
parent
6c0734a09f
commit
62f2a823f6
@ -983,7 +983,7 @@ namespace osu.Game
|
||||
|
||||
if (newOsuScreen.HideOverlaysOnEnter)
|
||||
CloseAllOverlays();
|
||||
else
|
||||
else if (!Toolbar.HiddenByUser)
|
||||
Toolbar.Show();
|
||||
|
||||
if (newOsuScreen.AllowBackButton)
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user