From d09bcabc8f90f36ae16c7bec076ea28011f6df1f Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Tue, 12 Sep 2017 21:00:20 -0300 Subject: [PATCH] Add a background to the overlay. --- .../Visual/TestCaseOnlineBeatmapSetOverlay.cs | 3 +++ osu.Game/Overlays/OnlineBeatmapSetOverlay.cs | 23 +++++++++++++------ 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/osu.Desktop.Tests/Visual/TestCaseOnlineBeatmapSetOverlay.cs b/osu.Desktop.Tests/Visual/TestCaseOnlineBeatmapSetOverlay.cs index be7127eaaf..832d5a1cb3 100644 --- a/osu.Desktop.Tests/Visual/TestCaseOnlineBeatmapSetOverlay.cs +++ b/osu.Desktop.Tests/Visual/TestCaseOnlineBeatmapSetOverlay.cs @@ -378,6 +378,9 @@ namespace osu.Desktop.VisualTests.Tests }, }); }); + + AddStep(@"hide", overlay.Hide); + AddStep(@"show without reload", overlay.Show); } } } diff --git a/osu.Game/Overlays/OnlineBeatmapSetOverlay.cs b/osu.Game/Overlays/OnlineBeatmapSetOverlay.cs index 0e215f059f..ab6d308af9 100644 --- a/osu.Game/Overlays/OnlineBeatmapSetOverlay.cs +++ b/osu.Game/Overlays/OnlineBeatmapSetOverlay.cs @@ -6,6 +6,7 @@ using OpenTK.Graphics; using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; +using osu.Framework.Graphics.Shapes; using osu.Game.Beatmaps; using osu.Game.Graphics; using osu.Game.Graphics.Containers; @@ -41,15 +42,23 @@ namespace osu.Game.Overlays Offset = new Vector2(0f, 1f), }; - Child = new ScrollContainer + Children = new Drawable[] { - RelativeSizeAxes = Axes.Both, - ScrollbarVisible = false, - Child = scrollContent = new ReverseChildIDFillFlowContainer + new Box { - RelativeSizeAxes = Axes.X, - AutoSizeAxes = Axes.Y, - Direction = FillDirection.Vertical, + RelativeSizeAxes = Axes.Both, + Colour = OsuColour.Gray(0.2f) + }, + new ScrollContainer + { + RelativeSizeAxes = Axes.Both, + ScrollbarVisible = false, + Child = scrollContent = new ReverseChildIDFillFlowContainer + { + RelativeSizeAxes = Axes.X, + AutoSizeAxes = Axes.Y, + Direction = FillDirection.Vertical, + }, }, }; }