Invert the playfield by default to make calculations a bit simpler and clean up a lot of code.

This commit is contained in:
smoogipooo
2017-05-16 17:34:41 +09:00
parent 62139015fb
commit 7039205363
6 changed files with 57 additions and 61 deletions

View File

@ -18,6 +18,7 @@ using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Rulesets.Mania.Objects;
using osu.Game.Rulesets.Mania.Judgements;
using osu.Game.Beatmaps.Timing;
using osu.Framework.Graphics.Primitives;
namespace osu.Game.Rulesets.Mania.UI
{
@ -56,51 +57,50 @@ namespace osu.Game.Rulesets.Mania.UI
},
new Container
{
Name = "Hit target",
Anchor = Anchor.BottomCentre,
Origin = Anchor.BottomCentre,
RelativeSizeAxes = Axes.X,
Height = hit_target_height,
Y = -ManiaPlayfield.HIT_TARGET_POSITION,
Name = "Hit target + hit objects",
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding { Top = ManiaPlayfield.HIT_TARGET_POSITION},
Children = new Drawable[]
{
new Box
new Container
{
Name = "Background",
RelativeSizeAxes = Axes.Both,
Colour = Color4.Black
},
hitTargetBar = new Container
{
Name = "Bar",
Anchor = Anchor.BottomCentre,
Origin = Anchor.BottomCentre,
Name = "Hit target",
RelativeSizeAxes = Axes.X,
Height = hit_target_bar_height,
Masking = true,
Children = new[]
Height = hit_target_height,
Children = new Drawable[]
{
new Box
{
RelativeSizeAxes = Axes.Both
Name = "Background",
RelativeSizeAxes = Axes.Both,
Colour = Color4.Black
},
hitTargetBar = new Container
{
Name = "Bar",
RelativeSizeAxes = Axes.X,
Height = hit_target_bar_height,
Masking = true,
Children = new[]
{
new Box
{
RelativeSizeAxes = Axes.Both
}
}
}
}
}
},
TimingSectionContainer = new TimeRelativeContainer(timingChanges)
{
Name = "Hit objects",
RelativeSizeAxes = Axes.Both,
},
}
},
TimingSectionContainer = new TimeRelativeContainer(timingChanges)
{
Name = "Hit objects",
RelativeSizeAxes = Axes.Both,
Anchor = Anchor.BottomCentre,
Origin = Anchor.BottomCentre,
Y = -ManiaPlayfield.HIT_TARGET_POSITION
},
new Container
{
Name = "Key",
Anchor = Anchor.BottomCentre,
Origin = Anchor.BottomCentre,
RelativeSizeAxes = Axes.X,
Height = ManiaPlayfield.HIT_TARGET_POSITION,
Children = new Drawable[]

View File

@ -74,8 +74,8 @@ namespace osu.Game.Rulesets.Mania.UI
{
new Container
{
Anchor = Anchor.BottomCentre,
Origin = Anchor.BottomCentre,
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
RelativeSizeAxes = Axes.Y,
AutoSizeAxes = Axes.X,
Masking = true,
@ -95,13 +95,18 @@ namespace osu.Game.Rulesets.Mania.UI
Padding = new MarginPadding { Left = 1, Right = 1 },
Spacing = new Vector2(1, 0)
},
barlineContainer = new TimeRelativeContainer(timingChanges)
new Container
{
Name = "Bar lines",
Anchor = Anchor.BottomCentre,
Origin = Anchor.BottomCentre,
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding { Bottom = HIT_TARGET_POSITION }
Padding = new MarginPadding { Top = HIT_TARGET_POSITION },
Children = new[]
{
barlineContainer = new TimeRelativeContainer(timingChanges)
{
Name = "Bar lines",
RelativeSizeAxes = Axes.Both,
}
}
}
}
}