Fix gap to left of InputDrum on legacy skins

This commit is contained in:
Dean Herbert 2020-04-23 13:07:30 +09:00
parent 2e022fbcb5
commit 61d2580e1c

View File

@ -20,15 +20,19 @@ namespace osu.Game.Rulesets.Taiko.Skinning
{
private LegacyHalfDrum left;
private LegacyHalfDrum right;
private Container content;
public LegacyInputDrum()
{
Size = new Vector2(180, 200);
RelativeSizeAxes = Axes.Both;
}
[BackgroundDependencyLoader]
private void load(ISkinSource skin)
{
Child = content = new Container
{
Size = new Vector2(180, 200),
Children = new Drawable[]
{
new Sprite
@ -51,6 +55,7 @@ namespace osu.Game.Rulesets.Taiko.Skinning
RimAction = TaikoAction.RightRim,
CentreAction = TaikoAction.RightCentre
}
}
};
// this will be used in the future for stable skin alignment. keeping here for reference.
@ -84,7 +89,7 @@ namespace osu.Game.Rulesets.Taiko.Skinning
// Relying on RelativeSizeAxes.Both + FillMode.Fit doesn't work due to the precise pixel layout requirements.
// This is a bit ugly but makes the non-legacy implementations a lot cleaner to implement.
Scale = new Vector2(Parent.DrawHeight / Size.Y);
content.Scale = new Vector2(DrawHeight / content.Size.Y);
}
/// <summary>