1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-16 18:32:54 +08:00

Merge pull request #550 from smoogipooo/better_centre_symbol

Use less scaling factors.
This commit is contained in:
Dean Herbert 2017-03-25 12:43:11 +09:00 committed by GitHub
commit 7a834a6cc1

View File

@ -99,8 +99,6 @@ namespace osu.Desktop.VisualTests.Tests
private class SwellCircle : BaseCircle
{
private const float symbol_size = TaikoHitObject.CIRCLE_RADIUS * 2f * 0.35f;
public SwellCircle(CirclePiece piece)
: base(piece)
{
@ -108,7 +106,8 @@ namespace osu.Desktop.VisualTests.Tests
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
TextSize = symbol_size,
TextSize = SYMBOL_INNER_SIZE,
Icon = FontAwesome.fa_asterisk,
Shadow = false
});
}
@ -136,8 +135,6 @@ namespace osu.Desktop.VisualTests.Tests
private class CentreHitCircle : BaseCircle
{
private const float symbol_size = TaikoHitObject.CIRCLE_RADIUS * 2f * 0.35f;
public CentreHitCircle(CirclePiece piece)
: base(piece)
{
@ -145,7 +142,7 @@ namespace osu.Desktop.VisualTests.Tests
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Size = new Vector2(symbol_size),
Size = new Vector2(SYMBOL_INNER_SIZE),
Masking = true,
Children = new[]
{
@ -166,8 +163,6 @@ namespace osu.Desktop.VisualTests.Tests
private class RimHitCircle : BaseCircle
{
private const float symbol_size = TaikoHitObject.CIRCLE_RADIUS * 2f * 0.45f;
public RimHitCircle(CirclePiece piece)
: base(piece)
{
@ -175,8 +170,8 @@ namespace osu.Desktop.VisualTests.Tests
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Size = new Vector2(symbol_size),
BorderThickness = 8,
Size = new Vector2(SYMBOL_SIZE),
BorderThickness = SYMBOL_BORDER,
BorderColour = Color4.White,
Masking = true,
Children = new[]
@ -200,6 +195,10 @@ namespace osu.Desktop.VisualTests.Tests
private abstract class BaseCircle : Container
{
protected const float SYMBOL_SIZE = TaikoHitObject.CIRCLE_RADIUS * 2f * 0.45f;
protected const float SYMBOL_BORDER = 8;
protected const float SYMBOL_INNER_SIZE = SYMBOL_SIZE - 2 * SYMBOL_BORDER;
protected readonly CirclePiece Piece;
protected BaseCircle(CirclePiece piece)