mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 13:32:54 +08:00
Centralise scale and apply to SPIN text
This commit is contained in:
parent
a0b3379909
commit
901102918e
@ -27,8 +27,6 @@ namespace osu.Game.Rulesets.Osu.Skinning
|
||||
private Sprite spinningMiddle;
|
||||
private Sprite fixedMiddle;
|
||||
|
||||
private const float final_scale = 0.625f;
|
||||
|
||||
private readonly Color4 glowColour = new Color4(3, 151, 255, 255);
|
||||
|
||||
private Container scaleContainer;
|
||||
@ -38,7 +36,7 @@ namespace osu.Game.Rulesets.Osu.Skinning
|
||||
{
|
||||
AddInternal(scaleContainer = new Container
|
||||
{
|
||||
Scale = new Vector2(final_scale),
|
||||
Scale = new Vector2(SPRITE_SCALE),
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
@ -127,7 +125,7 @@ namespace osu.Game.Rulesets.Osu.Skinning
|
||||
|
||||
glow.Alpha = DrawableSpinner.Progress;
|
||||
|
||||
scaleContainer.Scale = new Vector2(final_scale * (0.8f + (float)Interpolation.ApplyEasing(Easing.Out, DrawableSpinner.Progress) * 0.2f));
|
||||
scaleContainer.Scale = new Vector2(SPRITE_SCALE * (0.8f + (float)Interpolation.ApplyEasing(Easing.Out, DrawableSpinner.Progress) * 0.2f));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -26,8 +26,7 @@ namespace osu.Game.Rulesets.Osu.Skinning
|
||||
|
||||
private bool spinnerBlink;
|
||||
|
||||
private const float sprite_scale = 1 / 1.6f;
|
||||
private const float final_metre_height = 692 * sprite_scale;
|
||||
private const float final_metre_height = 692 * SPRITE_SCALE;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(ISkinSource source)
|
||||
@ -50,14 +49,14 @@ namespace osu.Game.Rulesets.Osu.Skinning
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Texture = source.GetTexture("spinner-background"),
|
||||
Scale = new Vector2(sprite_scale)
|
||||
Scale = new Vector2(SPRITE_SCALE)
|
||||
},
|
||||
disc = new Sprite
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Texture = source.GetTexture("spinner-circle"),
|
||||
Scale = new Vector2(sprite_scale)
|
||||
Scale = new Vector2(SPRITE_SCALE)
|
||||
},
|
||||
metre = new Container
|
||||
{
|
||||
@ -73,7 +72,7 @@ namespace osu.Game.Rulesets.Osu.Skinning
|
||||
Texture = source.GetTexture("spinner-metre"),
|
||||
Anchor = Anchor.TopLeft,
|
||||
Origin = Anchor.TopLeft,
|
||||
Scale = new Vector2(0.625f)
|
||||
Scale = new Vector2(SPRITE_SCALE)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,11 +9,14 @@ using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Osu.Objects.Drawables;
|
||||
using osu.Game.Skinning;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Skinning
|
||||
{
|
||||
public abstract class LegacySpinner : CompositeDrawable
|
||||
{
|
||||
protected const float SPRITE_SCALE = 0.625f;
|
||||
|
||||
protected DrawableSpinner DrawableSpinner { get; private set; }
|
||||
|
||||
private Sprite spin;
|
||||
@ -33,6 +36,7 @@ namespace osu.Game.Rulesets.Osu.Skinning
|
||||
Origin = Anchor.Centre,
|
||||
Depth = float.MinValue,
|
||||
Texture = source.GetTexture("spinner-spin"),
|
||||
Scale = new Vector2(SPRITE_SCALE),
|
||||
Y = 120 // todo: make match roughly?
|
||||
},
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user