From 358b7c9d3d5ce2d9f1c71aa7004018acf33e93d7 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Thu, 3 Aug 2017 08:19:25 +0930 Subject: [PATCH] Better InputDrum sizing + positioning. --- osu.Game.Rulesets.Taiko/UI/InputDrum.cs | 8 +++++--- osu.Game.Rulesets.Taiko/UI/TaikoPlayfield.cs | 9 ++++----- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/osu.Game.Rulesets.Taiko/UI/InputDrum.cs b/osu.Game.Rulesets.Taiko/UI/InputDrum.cs index 60881f3c24..0255171284 100644 --- a/osu.Game.Rulesets.Taiko/UI/InputDrum.cs +++ b/osu.Game.Rulesets.Taiko/UI/InputDrum.cs @@ -21,9 +21,10 @@ namespace osu.Game.Rulesets.Taiko.UI { 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[] { @@ -33,6 +34,7 @@ namespace osu.Game.Rulesets.Taiko.UI Anchor = Anchor.Centre, Origin = Anchor.CentreRight, RelativeSizeAxes = Axes.Both, + RelativePositionAxes = Axes.X, X = -middle_split / 2, RimKey = Key.D, CentreKey = Key.F @@ -43,8 +45,8 @@ namespace osu.Game.Rulesets.Taiko.UI Anchor = Anchor.Centre, Origin = Anchor.CentreLeft, RelativeSizeAxes = Axes.Both, + RelativePositionAxes = Axes.X, X = middle_split / 2, - Position = new Vector2(-1f, 0), RimKey = Key.K, CentreKey = Key.J } diff --git a/osu.Game.Rulesets.Taiko/UI/TaikoPlayfield.cs b/osu.Game.Rulesets.Taiko/UI/TaikoPlayfield.cs index 1f83e36c14..62f4ddd052 100644 --- a/osu.Game.Rulesets.Taiko/UI/TaikoPlayfield.cs +++ b/osu.Game.Rulesets.Taiko/UI/TaikoPlayfield.cs @@ -142,11 +142,10 @@ namespace osu.Game.Rulesets.Taiko.UI }, new InputDrum { - Anchor = Anchor.Centre, - Origin = Anchor.Centre, - RelativePositionAxes = Axes.X, - Position = new Vector2(0.10f, 0), - Scale = new Vector2(0.9f) + Anchor = Anchor.CentreRight, + Origin = Anchor.CentreRight, + Scale = new Vector2(0.9f), + Margin = new MarginPadding { Right = 20 } }, new Box {