Better InputDrum sizing + positioning.

This commit is contained in:
smoogipooo 2017-08-03 08:19:25 +09:30
parent 5352da277d
commit 358b7c9d3d
2 changed files with 9 additions and 8 deletions

View File

@ -21,9 +21,10 @@ namespace osu.Game.Rulesets.Taiko.UI
{ {
public InputDrum() public InputDrum()
{ {
Size = new Vector2(TaikoPlayfield.DEFAULT_PLAYFIELD_HEIGHT); RelativeSizeAxes = Axes.Both;
FillMode = FillMode.Fit;
const float middle_split = 10; const float middle_split = 0.025f;
Children = new Drawable[] Children = new Drawable[]
{ {
@ -33,6 +34,7 @@ namespace osu.Game.Rulesets.Taiko.UI
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.CentreRight, Origin = Anchor.CentreRight,
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
RelativePositionAxes = Axes.X,
X = -middle_split / 2, X = -middle_split / 2,
RimKey = Key.D, RimKey = Key.D,
CentreKey = Key.F CentreKey = Key.F
@ -43,8 +45,8 @@ namespace osu.Game.Rulesets.Taiko.UI
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.CentreLeft, Origin = Anchor.CentreLeft,
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
RelativePositionAxes = Axes.X,
X = middle_split / 2, X = middle_split / 2,
Position = new Vector2(-1f, 0),
RimKey = Key.K, RimKey = Key.K,
CentreKey = Key.J CentreKey = Key.J
} }

View File

@ -142,11 +142,10 @@ namespace osu.Game.Rulesets.Taiko.UI
}, },
new InputDrum new InputDrum
{ {
Anchor = Anchor.Centre, Anchor = Anchor.CentreRight,
Origin = Anchor.Centre, Origin = Anchor.CentreRight,
RelativePositionAxes = Axes.X, Scale = new Vector2(0.9f),
Position = new Vector2(0.10f, 0), Margin = new MarginPadding { Right = 20 }
Scale = new Vector2(0.9f)
}, },
new Box new Box
{ {