mirror of https://github.com/ppy/osu
Fix approach circles not scaling to circle correctly when a ski… (#5455)
Fix approach circles not scaling to circle correctly when a skin is applied
This commit is contained in:
commit
53a91b46e0
|
@ -133,7 +133,7 @@ protected override void UpdateInitialTransforms()
|
||||||
base.UpdateInitialTransforms();
|
base.UpdateInitialTransforms();
|
||||||
|
|
||||||
ApproachCircle.FadeIn(Math.Min(HitObject.TimeFadeIn * 2, HitObject.TimePreempt));
|
ApproachCircle.FadeIn(Math.Min(HitObject.TimeFadeIn * 2, HitObject.TimePreempt));
|
||||||
ApproachCircle.ScaleTo(1.1f, HitObject.TimePreempt);
|
ApproachCircle.ScaleTo(1f, HitObject.TimePreempt);
|
||||||
ApproachCircle.Expire(true);
|
ApproachCircle.Expire(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Textures;
|
using osu.Framework.Graphics.Textures;
|
||||||
using osu.Game.Skinning;
|
using osu.Game.Skinning;
|
||||||
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||||
{
|
{
|
||||||
|
@ -24,7 +25,26 @@ public ApproachCircle()
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(TextureStore textures)
|
private void load(TextureStore textures)
|
||||||
{
|
{
|
||||||
Child = new SkinnableSprite("Play/osu/approachcircle");
|
Child = new SkinnableApproachCircle();
|
||||||
|
}
|
||||||
|
|
||||||
|
private class SkinnableApproachCircle : SkinnableSprite
|
||||||
|
{
|
||||||
|
public SkinnableApproachCircle()
|
||||||
|
: base("Play/osu/approachcircle")
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override Drawable CreateDefault(string name)
|
||||||
|
{
|
||||||
|
var drawable = base.CreateDefault(name);
|
||||||
|
|
||||||
|
// account for the sprite being used for the default approach circle being taken from stable,
|
||||||
|
// when hitcircles have 5px padding on each size. this should be removed if we update the sprite.
|
||||||
|
drawable.Scale = new Vector2(128 / 118f);
|
||||||
|
|
||||||
|
return drawable;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue