1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 02:13:21 +08:00

Simplify state changes

This commit is contained in:
Dean Herbert 2017-07-19 10:59:13 +09:00
parent 632d2e8ba5
commit 0846414c5b
2 changed files with 13 additions and 13 deletions

View File

@ -48,8 +48,6 @@ namespace osu.Game.Screens.Select
protected override void LoadComplete()
{
base.LoadComplete();
State = Visibility.Visible;
AlwaysPresent = true;
}

View File

@ -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;