1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 23:52:57 +08:00

Fix depth values.

This commit is contained in:
Thomas Müller 2016-11-29 20:50:12 +01:00
parent 53df2932ad
commit b12b82fdd3
15 changed files with 19 additions and 19 deletions

@ -1 +1 @@
Subproject commit e125c03d8c39fd86e02e872a8d46654d2ea2759f
Subproject commit 7ec4902fe8b90f82e8e24dea98a69d2c4b37ac1e

View File

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

View File

@ -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.
},
};
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -83,7 +83,7 @@ namespace osu.Game
{
Children = new[]
{
Cursor = new OsuCursorContainer { Depth = float.MaxValue }
Cursor = new OsuCursorContainer { Depth = float.MinValue }
}
});
}

View File

@ -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),
},

View File

@ -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[]
{

View File

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

View File

@ -111,7 +111,7 @@ namespace osu.Game.Screens
{
AddInternal(new ParallaxContainer
{
Depth = float.MinValue,
Depth = float.MaxValue,
Children = new[]
{
Background = bg

View File

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

View File

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