From 0846414c5b589c9fa33723a3e41d578a198dd125 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 19 Jul 2017 10:59:13 +0900 Subject: [PATCH] Simplify state changes --- osu.Game/Screens/Select/BeatmapInfoWedge.cs | 2 -- osu.Game/Screens/Select/SongSelect.cs | 24 +++++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/osu.Game/Screens/Select/BeatmapInfoWedge.cs b/osu.Game/Screens/Select/BeatmapInfoWedge.cs index 18ad2ec412..8ba450720b 100644 --- a/osu.Game/Screens/Select/BeatmapInfoWedge.cs +++ b/osu.Game/Screens/Select/BeatmapInfoWedge.cs @@ -48,8 +48,6 @@ namespace osu.Game.Screens.Select protected override void LoadComplete() { base.LoadComplete(); - - State = Visibility.Visible; AlwaysPresent = true; } diff --git a/osu.Game/Screens/Select/SongSelect.cs b/osu.Game/Screens/Select/SongSelect.cs index bbdb195b77..90bbfcc0cb 100644 --- a/osu.Game/Screens/Select/SongSelect.cs +++ b/osu.Game/Screens/Select/SongSelect.cs @@ -127,7 +127,6 @@ namespace osu.Game.Screens.Select Top = left_area_padding, Right = left_area_padding, }, - X = -50, }); if (ShowFooter) @@ -232,23 +231,25 @@ namespace osu.Game.Screens.Select { base.OnEntering(last); - ensurePlayingSelected(); - - changeBackground(Beatmap); - - selectionChangeNoBounce = Beatmap?.BeatmapInfo; + //if (Beatmap != null && !Beatmap.BeatmapSetInfo.DeletePending) + //{ + // OnBeatmapChanged(Beatmap); + // ensurePlayingSelected(); + //} Content.FadeInFromZero(250); - beatmapInfoWedge.State = Visibility.Visible; - FilterControl.Activate(); } protected override void OnResuming(Screen last) { - changeBackground(Beatmap); - ensurePlayingSelected(); + if (Beatmap != null && !Beatmap.BeatmapSetInfo.DeletePending) + { + changeBackground(Beatmap); + ensurePlayingSelected(); + } + base.OnResuming(last); Content.FadeIn(250); @@ -301,6 +302,7 @@ namespace osu.Game.Screens.Select backgroundModeBeatmap.FadeTo(1, 250); } + beatmapInfoWedge.State = Visibility.Visible; beatmapInfoWedge.UpdateBeatmap(beatmap); } @@ -328,7 +330,7 @@ namespace osu.Game.Screens.Select { selectionChangedDebounce?.Cancel(); - if (beatmap.Equals(Beatmap?.BeatmapInfo)) + if (beatmap.Equals(selectionChangeNoBounce)) return; bool preview = beatmap.BeatmapSetInfoID != Beatmap?.BeatmapInfo.BeatmapSetInfoID;