From 3cee23fc000e6ed1d8762a26bcf822b777480371 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 8 Feb 2017 19:28:18 +0900 Subject: [PATCH 1/7] Toggle toolbar with Ctrl-T. --- osu.Game/OsuGame.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index 64958139da..7c68dfb4bc 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -168,6 +168,9 @@ namespace osu.Game { switch (args.Key) { + case Key.T: + Toolbar.ToggleVisibility(); + return true; case Key.O: options.ToggleVisibility(); return true; From 2e119cd74fe0390d67adb04fea21ba36e0114529 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 8 Feb 2017 19:32:55 +0900 Subject: [PATCH 2/7] Handle toolbar offsets better. --- osu.Game/OsuGame.cs | 9 +++++ osu.Game/Overlays/Toolbar/Toolbar.cs | 7 ++-- osu.Game/Screens/OsuGameMode.cs | 2 -- osu.Game/Screens/Select/PlaySongSelect.cs | 42 +++------------------- osu.Game/Screens/Select/WedgeBackground.cs | 40 +++++++++++++++++++++ osu.Game/osu.Game.csproj | 1 + 6 files changed, 56 insertions(+), 45 deletions(-) create mode 100644 osu.Game/Screens/Select/WedgeBackground.cs diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index 7c68dfb4bc..97c9dbb2e0 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -23,6 +23,7 @@ using osu.Game.Screens; using osu.Game.Screens.Menu; using OpenTK; using System.Linq; +using osu.Framework.Graphics.Primitives; namespace osu.Game { @@ -226,6 +227,14 @@ namespace osu.Game return base.OnExiting(); } + protected override void UpdateAfterChildren() + { + base.UpdateAfterChildren(); + + if (modeStack.ChildGameMode != null) + modeStack.ChildGameMode.Padding = new MarginPadding { Top = Toolbar.Position.Y + Toolbar.DrawHeight }; + } + private void modeAdded(GameMode newMode) { newMode.ModePushed += modeAdded; diff --git a/osu.Game/Overlays/Toolbar/Toolbar.cs b/osu.Game/Overlays/Toolbar/Toolbar.cs index 0640741ef0..625d2aa0b0 100644 --- a/osu.Game/Overlays/Toolbar/Toolbar.cs +++ b/osu.Game/Overlays/Toolbar/Toolbar.cs @@ -8,12 +8,9 @@ using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Transformations; using osu.Framework.Input; -using osu.Game.Configuration; using osu.Game.Graphics; using osu.Game.Modes; -using osu.Game.Online.API; using OpenTK; -using OpenTK.Graphics; namespace osu.Game.Overlays.Toolbar { @@ -135,8 +132,8 @@ namespace osu.Game.Overlays.Toolbar protected override void PopOut() { - MoveToY(-DrawSize.Y, transition_time, EasingTypes.InQuint); - FadeOut(transition_time, EasingTypes.InQuint); + MoveToY(-DrawSize.Y, transition_time, EasingTypes.OutQuint); + FadeOut(transition_time); } class PassThroughFlowContainer : FlowContainer diff --git a/osu.Game/Screens/OsuGameMode.cs b/osu.Game/Screens/OsuGameMode.cs index b2646f4dea..3134640a60 100644 --- a/osu.Game/Screens/OsuGameMode.cs +++ b/osu.Game/Screens/OsuGameMode.cs @@ -24,8 +24,6 @@ namespace osu.Game.Screens protected new OsuGameBase Game => base.Game as OsuGameBase; - protected float ToolbarPadding => ShowOverlays ? (Game as OsuGame)?.Toolbar.DrawHeight ?? 0 : 0; - private bool boundToBeatmap; private Bindable beatmap; diff --git a/osu.Game/Screens/Select/PlaySongSelect.cs b/osu.Game/Screens/Select/PlaySongSelect.cs index ccc0732984..81fa0bead1 100644 --- a/osu.Game/Screens/Select/PlaySongSelect.cs +++ b/osu.Game/Screens/Select/PlaySongSelect.cs @@ -11,15 +11,12 @@ using osu.Framework.Audio.Track; using osu.Framework.Configuration; using osu.Framework.GameModes; using osu.Framework.Graphics; -using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Primitives; -using osu.Framework.Graphics.Sprites; using osu.Game.Beatmaps; using osu.Game.Database; using osu.Game.Modes; using osu.Game.Screens.Backgrounds; using OpenTK; -using OpenTK.Graphics; using osu.Game.Screens.Play; using osu.Framework; using osu.Framework.Audio.Sample; @@ -45,7 +42,6 @@ namespace osu.Game.Screens.Select private TrackManager trackManager; private static readonly Vector2 wedged_container_size = new Vector2(0.5f, 225); - private static readonly Vector2 wedged_container_start_position = new Vector2(0, 50); private BeatmapInfoWedge beatmapInfoWedge; private static readonly Vector2 background_blur = new Vector2(20); @@ -58,34 +54,6 @@ namespace osu.Game.Screens.Select private Footer footer; - class WedgeBackground : Container - { - public WedgeBackground() - { - Children = new[] - { - new Box - { - RelativeSizeAxes = Axes.Both, - Size = new Vector2(1, 0.5f), - Colour = Color4.Black.Opacity(0.5f), - Shear = new Vector2(0.15f, 0), - EdgeSmoothness = new Vector2(2, 0), - }, - new Box - { - RelativeSizeAxes = Axes.Both, - RelativePositionAxes = Axes.Y, - Size = new Vector2(1, -0.5f), - Position = new Vector2(0, 1), - Colour = Color4.Black.Opacity(0.5f), - Shear = new Vector2(-0.15f, 0), - EdgeSmoothness = new Vector2(2, 0), - }, - }; - } - } - Player player; FilterControl filter; @@ -117,12 +85,12 @@ namespace osu.Game.Screens.Select OsuGame osuGame, OsuColour colours) { const float carousel_width = 640; - const float bottom_tool_height = 50; beatmapGroups = new List(); Children = new Drawable[] { new ParallaxContainer { + Masking = true, ParallaxAmount = 0.005f, RelativeSizeAxes = Axes.Both, Children = new [] @@ -143,7 +111,6 @@ namespace osu.Game.Screens.Select }, filter = new FilterControl { - Position = wedged_container_start_position, RelativeSizeAxes = Axes.X, FilterChanged = filterChanged, Exit = Exit, @@ -151,7 +118,6 @@ namespace osu.Game.Screens.Select beatmapInfoWedge = new BeatmapInfoWedge { Alpha = 0, - Position = wedged_container_start_position, Size = wedged_container_size, RelativeSizeAxes = Axes.X, Margin = new MarginPadding { Top = 20, Right = 20, }, @@ -236,8 +202,8 @@ namespace osu.Game.Screens.Select Content.FadeInFromZero(250); - beatmapInfoWedge.MoveToX(wedged_container_start_position.X - 50); - beatmapInfoWedge.MoveToX(wedged_container_start_position.X, 800, EasingTypes.OutQuint); + beatmapInfoWedge.MoveToX(-50); + beatmapInfoWedge.MoveToX(0, 800, EasingTypes.OutQuint); filter.Activate(); } @@ -269,7 +235,7 @@ namespace osu.Game.Screens.Select protected override bool OnExiting(GameMode next) { - beatmapInfoWedge.MoveTo(wedged_container_start_position + new Vector2(-100, 50), 800, EasingTypes.InQuint); + beatmapInfoWedge.MoveToX(-100, 800, EasingTypes.InQuint); beatmapInfoWedge.RotateTo(10, 800, EasingTypes.InQuint); Content.FadeOut(100); diff --git a/osu.Game/Screens/Select/WedgeBackground.cs b/osu.Game/Screens/Select/WedgeBackground.cs new file mode 100644 index 0000000000..901fa21c92 --- /dev/null +++ b/osu.Game/Screens/Select/WedgeBackground.cs @@ -0,0 +1,40 @@ +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Framework.Graphics; +using osu.Framework.Graphics.Containers; +using osu.Framework.Graphics.Sprites; +using osu.Game.Graphics; +using OpenTK; +using OpenTK.Graphics; + +namespace osu.Game.Screens.Select +{ + public class WedgeBackground : Container + { + public WedgeBackground() + { + Children = new[] + { + new Box + { + RelativeSizeAxes = Axes.Both, + Size = new Vector2(1, 0.5f), + Colour = Color4.Black.Opacity(0.5f), + Shear = new Vector2(0.15f, 0), + EdgeSmoothness = new Vector2(2, 0), + }, + new Box + { + RelativeSizeAxes = Axes.Both, + RelativePositionAxes = Axes.Y, + Size = new Vector2(1, -0.5f), + Position = new Vector2(0, 1), + Colour = Color4.Black.Opacity(0.5f), + Shear = new Vector2(-0.15f, 0), + EdgeSmoothness = new Vector2(2, 0), + }, + }; + } + } +} \ No newline at end of file diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index 1b1c851128..3f610bed42 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -188,6 +188,7 @@ + From a7dac15d05babcde0e94f5cfeecff76cd868fff6 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 8 Feb 2017 19:46:05 +0900 Subject: [PATCH 3/7] Toolbar is now toggled by the main menu. --- osu.Game/Overlays/Toolbar/Toolbar.cs | 4 ++-- osu.Game/Screens/Menu/ButtonSystem.cs | 13 ++++++++++--- osu.Game/Screens/Menu/MainMenu.cs | 10 +++------- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/osu.Game/Overlays/Toolbar/Toolbar.cs b/osu.Game/Overlays/Toolbar/Toolbar.cs index 625d2aa0b0..40287eda21 100644 --- a/osu.Game/Overlays/Toolbar/Toolbar.cs +++ b/osu.Game/Overlays/Toolbar/Toolbar.cs @@ -23,7 +23,7 @@ namespace osu.Game.Overlays.Toolbar private ToolbarModeSelector modeSelector; - private const int transition_time = 250; + private const int transition_time = 300; private const float alpha_hovering = 0.8f; private const float alpha_normal = 0.6f; @@ -127,7 +127,7 @@ namespace osu.Game.Overlays.Toolbar protected override void PopIn() { MoveToY(0, transition_time, EasingTypes.OutQuint); - FadeIn(transition_time, EasingTypes.OutQuint); + FadeIn(transition_time / 2, EasingTypes.OutQuint); } protected override void PopOut() diff --git a/osu.Game/Screens/Menu/ButtonSystem.cs b/osu.Game/Screens/Menu/ButtonSystem.cs index 67802ab2f3..a76cdbe99b 100644 --- a/osu.Game/Screens/Menu/ButtonSystem.cs +++ b/osu.Game/Screens/Menu/ButtonSystem.cs @@ -14,6 +14,7 @@ using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Transformations; using osu.Framework.Input; using osu.Game.Graphics; +using osu.Game.Overlays.Toolbar; using OpenTK; using OpenTK.Graphics; using OpenTK.Input; @@ -33,6 +34,8 @@ namespace osu.Game.Screens.Menu private AudioSample sampleOsuClick; + private Toolbar toolbar; + private FlowContainerWithOrigin buttonFlow; //todo: make these non-internal somehow. @@ -117,9 +120,10 @@ namespace osu.Game.Screens.Menu } [BackgroundDependencyLoader] - private void load(AudioManager audio) + private void load(AudioManager audio, OsuGame game) { sampleOsuClick = audio.Sample.Get(@"Menu/menuhit"); + toolbar = game.Toolbar; } protected override void LoadComplete() @@ -150,7 +154,7 @@ namespace osu.Game.Screens.Menu return true; } - + return false; } @@ -215,6 +219,8 @@ namespace osu.Game.Screens.Menu switch (state) { case MenuState.Initial: + toolbar?.Hide(); + buttonAreaBackground.ScaleTo(Vector2.One, 500, EasingTypes.Out); buttonArea.FadeOut(300); @@ -239,9 +245,10 @@ namespace osu.Game.Screens.Menu buttonArea.FadeIn(300); if (lastState == MenuState.Initial) - //todo: this propagates to invisible children and causes delays later down the track (on first MenuState.Play) buttonArea.Delay(150, true); + Scheduler.AddDelayed(() => toolbar?.Show(), 150); + foreach (Button b in buttonsTopLevel) b.State = ButtonState.Expanded; diff --git a/osu.Game/Screens/Menu/MainMenu.cs b/osu.Game/Screens/Menu/MainMenu.cs index 9a715c17be..f672a3998b 100644 --- a/osu.Game/Screens/Menu/MainMenu.cs +++ b/osu.Game/Screens/Menu/MainMenu.cs @@ -1,20 +1,16 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System; using osu.Framework.Allocation; using osu.Framework.GameModes; using osu.Framework.GameModes.Testing; using osu.Framework.Graphics; using osu.Framework.Graphics.Transformations; using osu.Game.Graphics.Containers; -using osu.Game.Modes; using osu.Game.Screens.Backgrounds; using osu.Game.Screens.Charts; using osu.Game.Screens.Direct; -using osu.Game.Screens.Edit; using osu.Game.Screens.Multiplayer; -using osu.Game.Screens.Play; using OpenTK; using osu.Game.Screens.Select; @@ -25,7 +21,7 @@ namespace osu.Game.Screens.Menu private ButtonSystem buttons; public override string Name => @"Main Menu"; - internal override bool ShowOverlays => true; + internal override bool ShowOverlays => buttons.State != MenuState.Initial; private BackgroundMode background; @@ -42,7 +38,7 @@ namespace osu.Game.Screens.Menu ParallaxAmount = 0.01f, Children = new Drawable[] { - buttons = new ButtonSystem() + buttons = new ButtonSystem { OnChart = delegate { Push(new ChartListing()); }, OnDirect = delegate { Push(new OnlineListing()); }, @@ -63,11 +59,11 @@ namespace osu.Game.Screens.Menu background.Preload(game); buttons.OnSettings = game.ToggleOptions; + } protected override void OnEntering(GameMode last) { - base.OnEntering(last); buttons.FadeInFromZero(500); } From 143cfae93a44de70151498a9bda2c311875d54a7 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 8 Feb 2017 19:53:50 +0900 Subject: [PATCH 4/7] Login overlay should disappear when toolbar is hidden. --- osu.Game/Overlays/Toolbar/Toolbar.cs | 7 +++++-- osu.Game/Overlays/Toolbar/ToolbarUserArea.cs | 11 +++-------- 2 files changed, 8 insertions(+), 10 deletions(-) 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 From b6398a1c778382a1b59fdf184182458c5e162ed8 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 8 Feb 2017 20:14:17 +0900 Subject: [PATCH 5/7] Centralise toolbar size variables and adjust to design. --- osu.Game/Overlays/Options/Sidebar.cs | 3 ++- osu.Game/Overlays/Toolbar/Toolbar.cs | 2 +- osu.Game/Overlays/Toolbar/ToolbarButton.cs | 10 ++++++---- osu.Game/Overlays/Toolbar/ToolbarUserButton.cs | 2 ++ 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/osu.Game/Overlays/Options/Sidebar.cs b/osu.Game/Overlays/Options/Sidebar.cs index b0762f3fd5..57865b84a7 100644 --- a/osu.Game/Overlays/Options/Sidebar.cs +++ b/osu.Game/Overlays/Options/Sidebar.cs @@ -11,13 +11,14 @@ using osu.Framework.Graphics.Transformations; using osu.Framework.Input; using osu.Framework.Threading; using osu.Game.Graphics; +using osu.Game.Overlays.Toolbar; namespace osu.Game.Overlays.Options { public class Sidebar : Container { private FlowContainer content; - internal const int DEFAULT_WIDTH = 60; + internal const float DEFAULT_WIDTH = ToolbarButton.WIDTH; internal const int EXPANDED_WIDTH = 200; protected override Container Content => content; diff --git a/osu.Game/Overlays/Toolbar/Toolbar.cs b/osu.Game/Overlays/Toolbar/Toolbar.cs index bc81e51daa..1b6abb475c 100644 --- a/osu.Game/Overlays/Toolbar/Toolbar.cs +++ b/osu.Game/Overlays/Toolbar/Toolbar.cs @@ -16,7 +16,7 @@ namespace osu.Game.Overlays.Toolbar { public class Toolbar : OverlayContainer { - public const float HEIGHT = 50; + public const float HEIGHT = 40; public Action OnHome; public Action OnPlayModeChange; diff --git a/osu.Game/Overlays/Toolbar/ToolbarButton.cs b/osu.Game/Overlays/Toolbar/ToolbarButton.cs index 919818dd54..160e4460d9 100644 --- a/osu.Game/Overlays/Toolbar/ToolbarButton.cs +++ b/osu.Game/Overlays/Toolbar/ToolbarButton.cs @@ -21,6 +21,8 @@ namespace osu.Game.Overlays.Toolbar { public class ToolbarButton : Container { + public const float WIDTH = Toolbar.HEIGHT * 1.4f; + public FontAwesome Icon { get { return DrawableIcon.Icon; } @@ -66,6 +68,9 @@ namespace osu.Game.Overlays.Toolbar public ToolbarButton() { + Width = WIDTH; + RelativeSizeAxes = Axes.Y; + Children = new Drawable[] { HoverBackground = new Box @@ -80,7 +85,7 @@ namespace osu.Game.Overlays.Toolbar Direction = FlowDirection.HorizontalOnly, Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, - Padding = new MarginPadding { Left = 20, Right = 20 }, + Padding = new MarginPadding { Left = Toolbar.HEIGHT / 2, Right = Toolbar.HEIGHT / 2 }, Spacing = new Vector2(5), RelativeSizeAxes = Axes.Y, AutoSizeAxes = Axes.X, @@ -121,9 +126,6 @@ namespace osu.Game.Overlays.Toolbar } } }; - - RelativeSizeAxes = Axes.Y; - AutoSizeAxes = Axes.X; } [BackgroundDependencyLoader] diff --git a/osu.Game/Overlays/Toolbar/ToolbarUserButton.cs b/osu.Game/Overlays/Toolbar/ToolbarUserButton.cs index 60d0eaacda..921c2d26df 100644 --- a/osu.Game/Overlays/Toolbar/ToolbarUserButton.cs +++ b/osu.Game/Overlays/Toolbar/ToolbarUserButton.cs @@ -20,6 +20,8 @@ namespace osu.Game.Overlays.Toolbar public ToolbarUserButton() { + AutoSizeAxes = Axes.X; + DrawableText.Font = @"Exo2.0-MediumItalic"; Add(new OpaqueBackground { Depth = 1 }); From 050fa7fbe8382b2dd026d70102f3732e15f0fef2 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 8 Feb 2017 20:14:37 +0900 Subject: [PATCH 6/7] Adjust FilterControl to match design and give an absolute height. --- osu.Game/Screens/Select/FilterControl.cs | 4 +--- osu.Game/Screens/Select/PlaySongSelect.cs | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/osu.Game/Screens/Select/FilterControl.cs b/osu.Game/Screens/Select/FilterControl.cs index 7152523b45..c3f0eb9b6d 100644 --- a/osu.Game/Screens/Select/FilterControl.cs +++ b/osu.Game/Screens/Select/FilterControl.cs @@ -27,14 +27,12 @@ namespace osu.Game.Screens.Select public FilterControl() { - AutoSizeAxes = Axes.Y; - Children = new Drawable[] { new Box { Colour = Color4.Black, - Alpha = 0.6f, + Alpha = 0.8f, RelativeSizeAxes = Axes.Both, }, new FlowContainer diff --git a/osu.Game/Screens/Select/PlaySongSelect.cs b/osu.Game/Screens/Select/PlaySongSelect.cs index 81fa0bead1..60c9b96552 100644 --- a/osu.Game/Screens/Select/PlaySongSelect.cs +++ b/osu.Game/Screens/Select/PlaySongSelect.cs @@ -26,7 +26,6 @@ using osu.Game.Graphics.Containers; using osu.Game.Graphics; using osu.Framework.Input; using OpenTK.Input; -using osu.Game.Graphics; using System.Collections.Generic; using osu.Framework.Threading; @@ -112,6 +111,7 @@ namespace osu.Game.Screens.Select filter = new FilterControl { RelativeSizeAxes = Axes.X, + Height = 100, FilterChanged = filterChanged, Exit = Exit, }, From d230c3f9ac8ec44a5c1cd4cda6ad7c8a6eb2d4ee Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 8 Feb 2017 20:30:05 +0900 Subject: [PATCH 7/7] Correct masking layers on song select. --- osu.Game/Screens/Select/PlaySongSelect.cs | 28 +++++++++++++++-------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/osu.Game/Screens/Select/PlaySongSelect.cs b/osu.Game/Screens/Select/PlaySongSelect.cs index 60c9b96552..e206c5d5fa 100644 --- a/osu.Game/Screens/Select/PlaySongSelect.cs +++ b/osu.Game/Screens/Select/PlaySongSelect.cs @@ -27,6 +27,7 @@ using osu.Game.Graphics; using osu.Framework.Input; using OpenTK.Input; using System.Collections.Generic; +using osu.Framework.Graphics.Containers; using osu.Framework.Threading; namespace osu.Game.Screens.Select @@ -48,7 +49,7 @@ namespace osu.Game.Screens.Select private AudioSample sampleChangeDifficulty; private AudioSample sampleChangeBeatmap; - + private List beatmapGroups; private Footer footer; @@ -84,20 +85,25 @@ namespace osu.Game.Screens.Select OsuGame osuGame, OsuColour colours) { const float carousel_width = 640; + const float filter_height = 100; + beatmapGroups = new List(); Children = new Drawable[] { new ParallaxContainer { - Masking = true, + Padding = new MarginPadding { Top = filter_height }, ParallaxAmount = 0.005f, RelativeSizeAxes = Axes.Both, - Children = new [] + Children = new[] { new WedgeBackground { RelativeSizeAxes = Axes.Both, - Padding = new MarginPadding { Right = carousel_width * 0.76f }, + Padding = new MarginPadding + { + Right = carousel_width * 0.76f + }, }, } }, @@ -111,7 +117,7 @@ namespace osu.Game.Screens.Select filter = new FilterControl { RelativeSizeAxes = Axes.X, - Height = 100, + Height = filter_height, FilterChanged = filterChanged, Exit = Exit, }, @@ -120,7 +126,11 @@ namespace osu.Game.Screens.Select Alpha = 0, Size = wedged_container_size, RelativeSizeAxes = Axes.X, - Margin = new MarginPadding { Top = 20, Right = 20, }, + Margin = new MarginPadding + { + Top = 20, + Right = 20, + }, }, footer = new Footer() { @@ -204,7 +214,7 @@ namespace osu.Game.Screens.Select beatmapInfoWedge.MoveToX(-50); beatmapInfoWedge.MoveToX(0, 800, EasingTypes.OutQuint); - + filter.Activate(); } @@ -228,7 +238,7 @@ namespace osu.Game.Screens.Select Content.ScaleTo(1.1f, 250, EasingTypes.InSine); Content.FadeOut(250); - + filter.Deactivate(); base.OnSuspending(next); } @@ -240,7 +250,7 @@ namespace osu.Game.Screens.Select Content.FadeOut(100); - filter.Deactivate(); + filter.Deactivate(); return base.OnExiting(next); }