mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 01:02:56 +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)
|
if (newOsuScreen.HideOverlaysOnEnter)
|
||||||
CloseAllOverlays();
|
CloseAllOverlays();
|
||||||
else
|
else if (!Toolbar.HiddenByUser)
|
||||||
Toolbar.Show();
|
Toolbar.Show();
|
||||||
|
|
||||||
if (newOsuScreen.AllowBackButton)
|
if (newOsuScreen.AllowBackButton)
|
||||||
|
@ -23,6 +23,8 @@ namespace osu.Game.Overlays.Toolbar
|
|||||||
public const float HEIGHT = 40;
|
public const float HEIGHT = 40;
|
||||||
public const float TOOLTIP_HEIGHT = 30;
|
public const float TOOLTIP_HEIGHT = 30;
|
||||||
|
|
||||||
|
public bool HiddenByUser;
|
||||||
|
|
||||||
public Action OnHome;
|
public Action OnHome;
|
||||||
|
|
||||||
private ToolbarUserButton userButton;
|
private ToolbarUserButton userButton;
|
||||||
@ -169,10 +171,14 @@ namespace osu.Game.Overlays.Toolbar
|
|||||||
|
|
||||||
public bool OnPressed(GlobalAction action)
|
public bool OnPressed(GlobalAction action)
|
||||||
{
|
{
|
||||||
|
if (OverlayActivationMode.Value == OverlayActivation.Disabled)
|
||||||
|
return false;
|
||||||
|
|
||||||
switch (action)
|
switch (action)
|
||||||
{
|
{
|
||||||
case GlobalAction.ToggleToolbar:
|
case GlobalAction.ToggleToolbar:
|
||||||
ToggleVisibility();
|
ToggleVisibility();
|
||||||
|
HiddenByUser = State.Value == Visibility.Hidden;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -352,7 +352,8 @@ namespace osu.Game.Screens.Menu
|
|||||||
if (impact)
|
if (impact)
|
||||||
logo.Impact();
|
logo.Impact();
|
||||||
|
|
||||||
game?.Toolbar.Show();
|
if (game?.Toolbar.HiddenByUser == false)
|
||||||
|
game.Toolbar.Show();
|
||||||
}, 200);
|
}, 200);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user