From af18d2535736f5b009f690479b18bf83ce9f54ee Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sat, 26 Nov 2016 17:31:35 +0900 Subject: [PATCH] Move some styling inside BeatmapInfoWedge and fix initial transition happening too early. --- osu.Game/Screens/Select/BeatmapInfoWedge.cs | 21 +++++++++++++++++++-- osu.Game/Screens/Select/PlaySongSelect.cs | 12 ------------ 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/osu.Game/Screens/Select/BeatmapInfoWedge.cs b/osu.Game/Screens/Select/BeatmapInfoWedge.cs index c6ed202326..7e87194cf4 100644 --- a/osu.Game/Screens/Select/BeatmapInfoWedge.cs +++ b/osu.Game/Screens/Select/BeatmapInfoWedge.cs @@ -16,10 +16,27 @@ namespace osu.Game.Screens.Select { class BeatmapInfoWedge : Container { + private static readonly Vector2 wedged_container_shear = new Vector2(0.15f, 0); + private Container beatmapInfoContainer; private BaseGame game; + public BeatmapInfoWedge() + { + Shear = wedged_container_shear; + Masking = true; + BorderColour = new Color4(221, 255, 255, 255); + BorderThickness = 2.5f; + EdgeEffect = new EdgeEffect + { + Type = EdgeEffectType.Glow, + Colour = new Color4(130, 204, 255, 150), + Radius = 20, + Roundness = 15, + }; + } + [BackgroundDependencyLoader] private void load(BaseGame game) { @@ -35,8 +52,6 @@ namespace osu.Game.Screens.Select float newDepth = lastContainer?.Depth - 1 ?? 0; - FadeIn(250); - BeatmapSetInfo beatmapSetInfo = beatmap.BeatmapSetInfo; BeatmapInfo beatmapInfo = beatmap.BeatmapInfo; @@ -126,6 +141,8 @@ namespace osu.Game.Screens.Select } }).Preload(game, delegate(Drawable d) { + FadeIn(250); + lastContainer?.FadeOut(250); lastContainer?.Expire(); diff --git a/osu.Game/Screens/Select/PlaySongSelect.cs b/osu.Game/Screens/Select/PlaySongSelect.cs index 371d014659..8c8ff39fba 100644 --- a/osu.Game/Screens/Select/PlaySongSelect.cs +++ b/osu.Game/Screens/Select/PlaySongSelect.cs @@ -38,7 +38,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_shear = new Vector2(0.15f, 0); private static readonly Vector2 wedged_container_start_position = new Vector2(0, 50); private BeatmapInfoWedge beatmapInfoWedge; @@ -105,18 +104,7 @@ namespace osu.Game.Screens.Select Position = wedged_container_start_position, Size = wedged_container_size, RelativeSizeAxes = Axes.X, - Shear = wedged_container_shear, Margin = new MarginPadding { Top = 20, Right = 20, }, - Masking = true, - BorderColour = new Color4(221, 255, 255, 255), - BorderThickness = 2.5f, - EdgeEffect = new EdgeEffect - { - Type = EdgeEffectType.Glow, - Colour = new Color4(130, 204, 255, 150), - Radius = 20, - Roundness = 15, - }, }, new Container {