From 86a6c7641dab5617d9b4af3e1255483906f7aec8 Mon Sep 17 00:00:00 2001 From: Huo Yaoyuan Date: Mon, 14 Nov 2016 04:59:41 +0800 Subject: [PATCH] Make TransformDirection more clear. --- osu.Game/Overlays/MusicController.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/osu.Game/Overlays/MusicController.cs b/osu.Game/Overlays/MusicController.cs index a7fe0f39c2..f6f82d57c2 100644 --- a/osu.Game/Overlays/MusicController.cs +++ b/osu.Game/Overlays/MusicController.cs @@ -237,7 +237,7 @@ namespace osu.Game.Overlays if (beatmapSource.Value == current) return; bool audioEquals = current?.BeatmapInfo.AudioEquals(beatmapSource.Value.BeatmapInfo) ?? false; current = beatmapSource.Value; - updateDisplay(current, audioEquals ? TransformDirection.None : TransformDirection.Left); + updateDisplay(current, audioEquals ? TransformDirection.None : TransformDirection.Next); appendToHistory(current.BeatmapInfo); } @@ -298,7 +298,7 @@ namespace osu.Game.Overlays current.Track.Start(); beatmapSource.Value = current; }); - updateDisplay(current, isNext ? TransformDirection.Left : TransformDirection.Right); + updateDisplay(current, isNext ? TransformDirection.Next : TransformDirection.Prev); } private void updateDisplay(WorkingBeatmap beatmap, TransformDirection direction) @@ -315,13 +315,13 @@ namespace osu.Game.Overlays Add(newBackground); - if (direction == TransformDirection.Left) + if (direction == TransformDirection.Next) { newBackground.Position = new Vector2(400, 0); newBackground.MoveToX(0, 500, EasingTypes.OutCubic); backgroundSprite.MoveToX(-400, 500, EasingTypes.OutCubic); } - else if (direction == TransformDirection.Right) + else if (direction == TransformDirection.Prev) { newBackground.Position = new Vector2(-400, 0); newBackground.MoveToX(0, 500, EasingTypes.OutCubic); @@ -354,7 +354,7 @@ namespace osu.Game.Overlays protected override void PopOut() => FadeOut(100); - private enum TransformDirection { None, Left, Right } + private enum TransformDirection { None, Next, Prev } private class MusicControllerBackground : BufferedContainer {