diff --git a/osu.Game/Overlays/Toolbar/Toolbar.cs b/osu.Game/Overlays/Toolbar/Toolbar.cs index 40287eda21..bc81e51daa 100644 --- a/osu.Game/Overlays/Toolbar/Toolbar.cs +++ b/osu.Game/Overlays/Toolbar/Toolbar.cs @@ -22,8 +22,9 @@ namespace osu.Game.Overlays.Toolbar public Action OnPlayModeChange; private ToolbarModeSelector modeSelector; + private ToolbarUserArea userArea; - private const int transition_time = 300; + private const int transition_time = 500; private const float alpha_hovering = 0.8f; private const float alpha_normal = 0.6f; @@ -67,7 +68,7 @@ namespace osu.Game.Overlays.Toolbar { Icon = FontAwesome.fa_search }, - new ToolbarUserArea(), + userArea = new ToolbarUserArea(), new ToolbarButton { Icon = FontAwesome.fa_bars @@ -132,6 +133,8 @@ namespace osu.Game.Overlays.Toolbar protected override void PopOut() { + userArea?.LoginOverlay.Hide(); + MoveToY(-DrawSize.Y, transition_time, EasingTypes.OutQuint); FadeOut(transition_time); } diff --git a/osu.Game/Overlays/Toolbar/ToolbarUserArea.cs b/osu.Game/Overlays/Toolbar/ToolbarUserArea.cs index 580e53bf6b..1955ef5c1c 100644 --- a/osu.Game/Overlays/Toolbar/ToolbarUserArea.cs +++ b/osu.Game/Overlays/Toolbar/ToolbarUserArea.cs @@ -10,7 +10,7 @@ namespace osu.Game.Overlays.Toolbar { class ToolbarUserArea : Container { - private LoginOverlay loginOverlay; + public LoginOverlay LoginOverlay; private ToolbarUserButton button; public override RectangleF BoundingBox => button.BoundingBox; @@ -25,9 +25,9 @@ namespace osu.Game.Overlays.Toolbar Children = new Drawable[] { button = new ToolbarUserButton { - Action = toggle, + Action = () => LoginOverlay.ToggleVisibility(), }, - loginOverlay = new LoginOverlay + LoginOverlay = new LoginOverlay { BypassAutoSizeAxes = Axes.Both, Position = new Vector2(0, 1), @@ -37,10 +37,5 @@ namespace osu.Game.Overlays.Toolbar } }; } - - private void toggle() - { - loginOverlay.ToggleVisibility(); - } } } \ No newline at end of file