From b12b82fdd38b359437c63dbd152dc001860cf3c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Tue, 29 Nov 2016 20:50:12 +0100 Subject: [PATCH 1/2] Fix depth values. --- osu-framework | 2 +- osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs | 4 ++-- osu.Game.Mode.Osu/Objects/Drawables/DrawableSlider.cs | 2 +- osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs | 2 +- osu.Game/Graphics/Backgrounds/Background.cs | 2 +- osu.Game/Graphics/Cursor/OsuCursorContainer.cs | 2 +- osu.Game/Modes/Objects/Drawables/DrawableHitObject.cs | 2 +- osu.Game/OsuGame.cs | 6 +++--- osu.Game/OsuGameBase.cs | 2 +- osu.Game/Overlays/ChatConsole.cs | 2 +- osu.Game/Overlays/MusicController.cs | 2 +- osu.Game/Screens/Backgrounds/BackgroundModeBeatmap.cs | 2 +- osu.Game/Screens/OsuGameMode.cs | 2 +- osu.Game/Screens/Select/BeatmapInfoWedge.cs | 2 +- osu.Game/Screens/Select/CarouselContainer.cs | 4 ++-- 15 files changed, 19 insertions(+), 19 deletions(-) diff --git a/osu-framework b/osu-framework index e125c03d8c..7ec4902fe8 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit e125c03d8c39fd86e02e872a8d46654d2ea2759f +Subproject commit 7ec4902fe8b90f82e8e24dea98a69d2c4b37ac1e diff --git a/osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs b/osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs index 0569fcf3c3..1e18ae4117 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs @@ -32,7 +32,7 @@ namespace osu.Desktop.VisualTests.Tests Clock.ProcessFrame(); - Container approachContainer = new Container { Depth = float.MaxValue, }; + Container approachContainer = new Container { Depth = float.MinValue, }; Add(approachContainer); @@ -50,7 +50,7 @@ namespace osu.Desktop.VisualTests.Tests { Anchor = Anchor.Centre, Origin = Anchor.Centre, - Depth = -i, + Depth = i, State = ArmedState.Hit, }; diff --git a/osu.Game.Mode.Osu/Objects/Drawables/DrawableSlider.cs b/osu.Game.Mode.Osu/Objects/Drawables/DrawableSlider.cs index 1d55d704c4..f9fc866414 100644 --- a/osu.Game.Mode.Osu/Objects/Drawables/DrawableSlider.cs +++ b/osu.Game.Mode.Osu/Objects/Drawables/DrawableSlider.cs @@ -44,7 +44,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables Colour = s.Colour, }) { - Depth = 1 //override time-based depth. + Depth = -1 //override time-based depth. }, }; } diff --git a/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs b/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs index bd36ad5149..7234e2ad8b 100644 --- a/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs +++ b/osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs @@ -119,7 +119,7 @@ namespace osu.Game.Beatmaps.Drawables { new FlowContainer { - Depth = 1, + Depth = -1, Direction = FlowDirection.HorizontalOnly, RelativeSizeAxes = Axes.Both, // This makes the gradient not be perfectly horizontal, but diagonal at a ~40° angle diff --git a/osu.Game/Graphics/Backgrounds/Background.cs b/osu.Game/Graphics/Backgrounds/Background.cs index 368bb7d723..ebb9348af7 100644 --- a/osu.Game/Graphics/Backgrounds/Background.cs +++ b/osu.Game/Graphics/Backgrounds/Background.cs @@ -22,7 +22,7 @@ namespace osu.Game.Graphics.Backgrounds { this.textureName = textureName; RelativeSizeAxes = Axes.Both; - Depth = float.MinValue; + Depth = float.MaxValue; Add(Sprite = new Sprite { diff --git a/osu.Game/Graphics/Cursor/OsuCursorContainer.cs b/osu.Game/Graphics/Cursor/OsuCursorContainer.cs index 22d7af7dc8..0b36e006fd 100644 --- a/osu.Game/Graphics/Cursor/OsuCursorContainer.cs +++ b/osu.Game/Graphics/Cursor/OsuCursorContainer.cs @@ -19,7 +19,7 @@ namespace osu.Game.Graphics.Cursor public OsuCursorContainer() { - Add(new CursorTrail { Depth = -1 }); + Add(new CursorTrail { Depth = 1 }); } protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) diff --git a/osu.Game/Modes/Objects/Drawables/DrawableHitObject.cs b/osu.Game/Modes/Objects/Drawables/DrawableHitObject.cs index 3508d6c3a6..a534c4b296 100644 --- a/osu.Game/Modes/Objects/Drawables/DrawableHitObject.cs +++ b/osu.Game/Modes/Objects/Drawables/DrawableHitObject.cs @@ -28,7 +28,7 @@ namespace osu.Game.Modes.Objects.Drawables public DrawableHitObject(HitObject hitObject) { HitObject = hitObject; - Depth = -(float)hitObject.StartTime; + Depth = (float)hitObject.StartTime; } private ArmedState state; diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index 7bf7e4cd2a..3c5c27ecb9 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -116,11 +116,11 @@ namespace osu.Game //overlay elements (chat = new ChatConsole(API) { Depth = 0 }).Preload(this, overlayContent.Add); - (Options = new OptionsOverlay { Depth = 1 }).Preload(this, overlayContent.Add); - (musicController = new MusicController() { Depth = 3 }).Preload(this, overlayContent.Add); + (Options = new OptionsOverlay { Depth = -1 }).Preload(this, overlayContent.Add); + (musicController = new MusicController() { Depth = -3 }).Preload(this, overlayContent.Add); (Toolbar = new Toolbar { - Depth = 2, + Depth = -2, OnHome = delegate { mainMenu?.MakeCurrent(); }, OnSettings = Options.ToggleVisibility, OnPlayModeChange = delegate (PlayMode m) { PlayMode.Value = m; }, diff --git a/osu.Game/OsuGameBase.cs b/osu.Game/OsuGameBase.cs index f58e868e1c..4399a9f0c3 100644 --- a/osu.Game/OsuGameBase.cs +++ b/osu.Game/OsuGameBase.cs @@ -83,7 +83,7 @@ namespace osu.Game { Children = new[] { - Cursor = new OsuCursorContainer { Depth = float.MaxValue } + Cursor = new OsuCursorContainer { Depth = float.MinValue } } }); } diff --git a/osu.Game/Overlays/ChatConsole.cs b/osu.Game/Overlays/ChatConsole.cs index ee06e29877..8913041fe1 100644 --- a/osu.Game/Overlays/ChatConsole.cs +++ b/osu.Game/Overlays/ChatConsole.cs @@ -45,7 +45,7 @@ namespace osu.Game.Overlays { new Box { - Depth = float.MinValue, + Depth = float.MaxValue, RelativeSizeAxes = Axes.Both, Colour = new Color4(0.1f, 0.1f, 0.1f, 0.4f), }, diff --git a/osu.Game/Overlays/MusicController.cs b/osu.Game/Overlays/MusicController.cs index 27080c8db4..e8be9efb1b 100644 --- a/osu.Game/Overlays/MusicController.cs +++ b/osu.Game/Overlays/MusicController.cs @@ -386,7 +386,7 @@ namespace osu.Game.Overlays this.beatmap = beatmap; CacheDrawnFrameBuffer = true; RelativeSizeAxes = Axes.Both; - Depth = float.MinValue; + Depth = float.MaxValue; Children = new Drawable[] { diff --git a/osu.Game/Screens/Backgrounds/BackgroundModeBeatmap.cs b/osu.Game/Screens/Backgrounds/BackgroundModeBeatmap.cs index 1a4ce2eec2..1c25fcfb0e 100644 --- a/osu.Game/Screens/Backgrounds/BackgroundModeBeatmap.cs +++ b/osu.Game/Screens/Backgrounds/BackgroundModeBeatmap.cs @@ -39,7 +39,7 @@ namespace osu.Game.Screens.Backgrounds float newDepth = 0; if (background != null) { - newDepth = background.Depth - 1; + newDepth = background.Depth + 1; background.Flush(); background.FadeOut(250); background.Expire(); diff --git a/osu.Game/Screens/OsuGameMode.cs b/osu.Game/Screens/OsuGameMode.cs index 51b8c7d7cf..b5e45f2097 100644 --- a/osu.Game/Screens/OsuGameMode.cs +++ b/osu.Game/Screens/OsuGameMode.cs @@ -111,7 +111,7 @@ namespace osu.Game.Screens { AddInternal(new ParallaxContainer { - Depth = float.MinValue, + Depth = float.MaxValue, Children = new[] { Background = bg diff --git a/osu.Game/Screens/Select/BeatmapInfoWedge.cs b/osu.Game/Screens/Select/BeatmapInfoWedge.cs index 7e87194cf4..203d290fc3 100644 --- a/osu.Game/Screens/Select/BeatmapInfoWedge.cs +++ b/osu.Game/Screens/Select/BeatmapInfoWedge.cs @@ -50,7 +50,7 @@ namespace osu.Game.Screens.Select var lastContainer = beatmapInfoContainer; - float newDepth = lastContainer?.Depth - 1 ?? 0; + float newDepth = lastContainer?.Depth + 1 ?? 0; BeatmapSetInfo beatmapSetInfo = beatmap.BeatmapSetInfo; BeatmapInfo beatmapInfo = beatmap.BeatmapInfo; diff --git a/osu.Game/Screens/Select/CarouselContainer.cs b/osu.Game/Screens/Select/CarouselContainer.cs index 9ff950cc06..98bcf093af 100644 --- a/osu.Game/Screens/Select/CarouselContainer.cs +++ b/osu.Game/Screens/Select/CarouselContainer.cs @@ -81,12 +81,12 @@ namespace osu.Game.Screens.Select group.State = BeatmapGroupState.Collapsed; groups.Add(group); - group.Header.Depth = scrollableContent.Children.Count(); + group.Header.Depth = -scrollableContent.Children.Count(); scrollableContent.Add(group.Header); foreach (BeatmapPanel panel in group.BeatmapPanels) { - panel.Depth = scrollableContent.Children.Count(); + panel.Depth = -scrollableContent.Children.Count(); scrollableContent.Add(panel); } From 62bd7e15ad9e8cc0fd068f2cfe501252e0a12786 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 30 Nov 2016 12:21:32 +0900 Subject: [PATCH 2/2] Update framework. --- osu-framework | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu-framework b/osu-framework index 7ec4902fe8..4fd477755a 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 7ec4902fe8b90f82e8e24dea98a69d2c4b37ac1e +Subproject commit 4fd477755a640a497c04fc8e540e8641278aa056