diff --git a/osu.Game.Rulesets.Taiko/Objects/Drawables/Pieces/CentreHitSymbolPiece.cs b/osu.Game.Rulesets.Taiko/Objects/Drawables/Pieces/CentreHitSymbolPiece.cs index 8ad548b3d6..f4c78251d0 100644 --- a/osu.Game.Rulesets.Taiko/Objects/Drawables/Pieces/CentreHitSymbolPiece.cs +++ b/osu.Game.Rulesets.Taiko/Objects/Drawables/Pieces/CentreHitSymbolPiece.cs @@ -11,17 +11,26 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables.Pieces /// /// The symbol used for centre hit pieces. /// - public class CentreHitSymbolPiece : CircularContainer + public class CentreHitSymbolPiece : Container { public CentreHitSymbolPiece() { Anchor = Anchor.Centre; Origin = Anchor.Centre; - Size = new Vector2(CirclePiece.SYMBOL_INNER_SIZE); - Masking = true; + RelativeSizeAxes = Axes.Both; + Size = new Vector2(CirclePiece.SYMBOL_SIZE); + Padding = new MarginPadding(CirclePiece.SYMBOL_BORDER); - Children = new[] { new Box { RelativeSizeAxes = Axes.Both } }; + Children = new[] + { + new CircularContainer + { + RelativeSizeAxes = Axes.Both, + Masking = true, + Children = new[] { new Box { RelativeSizeAxes = Axes.Both } } + } + }; } } } diff --git a/osu.Game.Rulesets.Taiko/Objects/Drawables/Pieces/CirclePiece.cs b/osu.Game.Rulesets.Taiko/Objects/Drawables/Pieces/CirclePiece.cs index 481f0a6fc8..541c774cca 100644 --- a/osu.Game.Rulesets.Taiko/Objects/Drawables/Pieces/CirclePiece.cs +++ b/osu.Game.Rulesets.Taiko/Objects/Drawables/Pieces/CirclePiece.cs @@ -22,9 +22,8 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables.Pieces /// public class CirclePiece : TaikoPiece { - public const float SYMBOL_SIZE = 36; + public const float SYMBOL_SIZE = 0.35f; public const float SYMBOL_BORDER = 8; - public const float SYMBOL_INNER_SIZE = SYMBOL_SIZE - 2 * SYMBOL_BORDER; private const double pre_beat_transition_time = 80; /// diff --git a/osu.Game.Rulesets.Taiko/Objects/Drawables/Pieces/SwellSymbolPiece.cs b/osu.Game.Rulesets.Taiko/Objects/Drawables/Pieces/SwellSymbolPiece.cs index d4f57f5959..cf16d53bb4 100644 --- a/osu.Game.Rulesets.Taiko/Objects/Drawables/Pieces/SwellSymbolPiece.cs +++ b/osu.Game.Rulesets.Taiko/Objects/Drawables/Pieces/SwellSymbolPiece.cs @@ -1,7 +1,10 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using System; +using OpenTK; using osu.Framework.Graphics; +using osu.Framework.Graphics.Containers; using osu.Game.Graphics; namespace osu.Game.Rulesets.Taiko.Objects.Drawables.Pieces @@ -9,18 +12,34 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables.Pieces /// /// The symbol used for swell pieces. /// - public class SwellSymbolPiece : TextAwesome + public class SwellSymbolPiece : Container { + private readonly TextAwesome symbol; + public SwellSymbolPiece() { Anchor = Anchor.Centre; Origin = Anchor.Centre; - TextSize = CirclePiece.SYMBOL_INNER_SIZE; + RelativeSizeAxes = Axes.Both; + Size = new Vector2(CirclePiece.SYMBOL_SIZE); + Padding = new MarginPadding(CirclePiece.SYMBOL_BORDER); - Icon = FontAwesome.fa_asterisk; - UseFullGlyphHeight = true; - Shadow = false; + Children = new[] + { + symbol = new TextAwesome + { + Icon = FontAwesome.fa_asterisk, + UseFullGlyphHeight = true, + Shadow = false + } + }; + } + + protected override void Update() + { + base.Update(); + symbol.TextSize = Math.Min(ChildSize.X, ChildSize.Y); } } }