mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 13:22:55 +08:00
Apply new style spinner scale to only local sprites
This commit is contained in:
parent
11c18952e3
commit
5ec6011340
@ -3,6 +3,7 @@
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Utils;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
@ -30,12 +31,18 @@ namespace osu.Game.Rulesets.Osu.Skinning
|
||||
|
||||
private readonly Color4 glowColour = new Color4(3, 151, 255, 255);
|
||||
|
||||
private Container scaleContainer;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(ISkinSource source)
|
||||
{
|
||||
Scale = new Vector2(final_scale);
|
||||
|
||||
AddRangeInternal(new Drawable[]
|
||||
AddInternal(scaleContainer = new Container
|
||||
{
|
||||
Scale = new Vector2(final_scale),
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
glow = new Sprite
|
||||
{
|
||||
@ -69,6 +76,7 @@ namespace osu.Game.Rulesets.Osu.Skinning
|
||||
Origin = Anchor.Centre,
|
||||
Texture = source.GetTexture("spinner-middle2")
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -119,7 +127,7 @@ namespace osu.Game.Rulesets.Osu.Skinning
|
||||
|
||||
glow.Alpha = DrawableSpinner.Progress;
|
||||
|
||||
Scale = new Vector2(final_scale * (0.8f + (float)Interpolation.ApplyEasing(Easing.Out, DrawableSpinner.Progress) * 0.2f));
|
||||
scaleContainer.Scale = new Vector2(final_scale * (0.8f + (float)Interpolation.ApplyEasing(Easing.Out, DrawableSpinner.Progress) * 0.2f));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user