From 25fecfca064e9c4babbd7c3988f7c3502f1c4394 Mon Sep 17 00:00:00 2001 From: Huo Yaoyuan Date: Mon, 26 Sep 2016 16:56:39 +0800 Subject: [PATCH] Relative size and position for text layer. --- osu.Game/Graphics/UserInterface/KeyCounter.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/osu.Game/Graphics/UserInterface/KeyCounter.cs b/osu.Game/Graphics/UserInterface/KeyCounter.cs index 6159b9ab05..d715c7c0fd 100644 --- a/osu.Game/Graphics/UserInterface/KeyCounter.cs +++ b/osu.Game/Graphics/UserInterface/KeyCounter.cs @@ -80,6 +80,7 @@ namespace osu.Game.Graphics.UserInterface { Anchor = Anchor.Centre, Origin = Anchor.Centre, + SizeMode = InheritMode.XY, Children = new Drawable[] { new SpriteText @@ -87,7 +88,8 @@ namespace osu.Game.Graphics.UserInterface Text = Name, Anchor = Anchor.Centre, Origin = Anchor.Centre, - Position = new Vector2(0, -buttonSprite.Height / 4), + PositionMode = InheritMode.XY, + Position = new Vector2(0, -0.25f), Colour = KeyUpTextColor }, countSpriteText = new SpriteText @@ -95,7 +97,8 @@ namespace osu.Game.Graphics.UserInterface Text = Count.ToString(@"#,0"), Anchor = Anchor.Centre, Origin = Anchor.Centre, - Position = new Vector2(0, buttonSprite.Height / 4), + PositionMode = InheritMode.XY, + Position = new Vector2(0, 0.25f), Colour = KeyUpTextColor } }