Fix taiko major barlines no longer rendering correctly

This commit is contained in:
Salman Ahmed 2022-11-08 04:05:06 +03:00
parent cb6b9898c1
commit 3af48352c9
1 changed files with 15 additions and 15 deletions

View File

@ -60,8 +60,9 @@ public class TaikoPlayfield : ScrollingPlayfield
/// </remarks>
private BarLinePlayfield barLinePlayfield;
private Container playfieldContent;
private Container playfieldOverlay;
private Container barLineContent;
private Container hitObjectContent;
private Container overlayContent;
[BackgroundDependencyLoader]
private void load(OsuColour colours)
@ -121,22 +122,20 @@ private void load(OsuColour colours)
}
}
},
new Container
barLineContent = new Container
{
Name = "Bar line content",
RelativeSizeAxes = Axes.Both,
Child = barLinePlayfield = new BarLinePlayfield(),
},
hitObjectContent = new Container
{
Name = "Masked hit objects content",
RelativeSizeAxes = Axes.Both,
Masking = true,
Child = playfieldContent = new Container
{
RelativeSizeAxes = Axes.Both,
Children = new Drawable[]
{
barLinePlayfield = new BarLinePlayfield(),
HitObjectContainer,
}
}
Child = HitObjectContainer,
},
playfieldOverlay = new Container
overlayContent = new Container
{
Name = "Elements after hit objects",
RelativeSizeAxes = Axes.Both,
@ -215,8 +214,9 @@ protected override void Update()
// Padding is required to be updated for elements which are based on "absolute" X sized elements.
// This is basically allowing for correct alignment as relative pieces move around them.
rightArea.Padding = new MarginPadding { Left = inputDrum.Width };
playfieldContent.Padding = new MarginPadding { Left = HitTarget.DrawWidth / 2 };
playfieldOverlay.Padding = new MarginPadding { Left = HitTarget.DrawWidth / 2 };
barLineContent.Padding = new MarginPadding { Left = HitTarget.DrawWidth / 2 };
hitObjectContent.Padding = new MarginPadding { Left = HitTarget.DrawWidth / 2 };
overlayContent.Padding = new MarginPadding { Left = HitTarget.DrawWidth / 2 };
mascot.Scale = new Vector2(DrawHeight / DEFAULT_HEIGHT);
}