From 579b8328dcbc7e604d85175c6f1e1ef1beead44e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Wed, 30 Nov 2016 20:50:41 +0100 Subject: [PATCH] Revert "Fix options sidebar being transparent when moving in from the side, showing a view of the broken region left of the gamemode stack." This reverts commit 27a13eec97a292d828aa2e8e440d0bef2d4d7194. --- osu.Game/Overlays/OptionsOverlay.cs | 80 ++++++++++++----------------- 1 file changed, 34 insertions(+), 46 deletions(-) diff --git a/osu.Game/Overlays/OptionsOverlay.cs b/osu.Game/Overlays/OptionsOverlay.cs index e9b7a1cc50..33677799f1 100644 --- a/osu.Game/Overlays/OptionsOverlay.cs +++ b/osu.Game/Overlays/OptionsOverlay.cs @@ -38,7 +38,6 @@ namespace osu.Game.Overlays private const float sidebar_padding = 10; - private Container scrollableSection; private ScrollContainer scrollContainer; private OptionsSidebar sidebar; private SidebarButton[] sidebarButtons; @@ -65,59 +64,50 @@ namespace osu.Game.Overlays Children = new Drawable[] { - scrollableSection = new Container() + new Box { + RelativeSizeAxes = Axes.Both, + Colour = Color4.Black, + Alpha = 0.6f, + }, + scrollContainer = new ScrollContainer + { + ScrollDraggerVisible = false, RelativeSizeAxes = Axes.Y, - AutoSizeAxes = Axes.X, - - Children = new Drawable[] + Width = width, + Margin = new MarginPadding { Left = SIDEBAR_WIDTH }, + Children = new[] { - new Box + new FlowContainer { - RelativeSizeAxes = Axes.Both, - Colour = Color4.Black, - Alpha = 0.6f, - }, - scrollContainer = new ScrollContainer - { - ScrollDraggerVisible = false, - RelativeSizeAxes = Axes.Y, - Width = width, - Margin = new MarginPadding { Left = SIDEBAR_WIDTH }, - Children = new[] + AutoSizeAxes = Axes.Y, + RelativeSizeAxes = Axes.X, + Direction = FlowDirection.VerticalOnly, + + Children = new Drawable[] { + new SpriteText + { + Text = "settings", + TextSize = 40, + Margin = new MarginPadding { Left = CONTENT_MARGINS, Top = 30 }, + }, + new SpriteText + { + Colour = new Color4(255, 102, 170, 255), + Text = "Change the way osu! behaves", + TextSize = 18, + Margin = new MarginPadding { Left = CONTENT_MARGINS, Bottom = 30 }, + }, new FlowContainer { AutoSizeAxes = Axes.Y, RelativeSizeAxes = Axes.X, Direction = FlowDirection.VerticalOnly, - - Children = new Drawable[] - { - new SpriteText - { - Text = "settings", - TextSize = 40, - Margin = new MarginPadding { Left = CONTENT_MARGINS, Top = 30 }, - }, - new SpriteText - { - Colour = new Color4(255, 102, 170, 255), - Text = "Change the way osu! behaves", - TextSize = 18, - Margin = new MarginPadding { Left = CONTENT_MARGINS, Bottom = 30 }, - }, - new FlowContainer - { - AutoSizeAxes = Axes.Y, - RelativeSizeAxes = Axes.X, - Direction = FlowDirection.VerticalOnly, - Children = sections, - } - } + Children = sections, } } - }, + } } }, sidebar = new OptionsSidebar @@ -191,16 +181,14 @@ namespace osu.Game.Overlays { scrollContainer.MoveToX(0, TRANSITION_LENGTH, EasingTypes.OutQuint); sidebar.MoveToX(0, TRANSITION_LENGTH, EasingTypes.OutQuint); - - scrollableSection.FadeTo(1, TRANSITION_LENGTH / 2); + FadeTo(1, TRANSITION_LENGTH / 2); } protected override void PopOut() { scrollContainer.MoveToX(-width, TRANSITION_LENGTH, EasingTypes.OutQuint); sidebar.MoveToX(-SIDEBAR_WIDTH, TRANSITION_LENGTH, EasingTypes.OutQuint); - - scrollableSection.FadeTo(0, TRANSITION_LENGTH / 2); + FadeTo(0, TRANSITION_LENGTH / 2); } } }