1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 23:12:56 +08:00

Add back outer fill for hitcircles (but not slider head circles)

This commit is contained in:
Dean Herbert 2022-09-19 16:14:35 +09:00
parent edc624c4be
commit 4eae5f8733
2 changed files with 12 additions and 3 deletions

View File

@ -27,6 +27,7 @@ namespace osu.Game.Rulesets.Osu.Skinning.Argon
public const float OUTER_GRADIENT_SIZE = OsuHitObject.OBJECT_RADIUS * 2 - BORDER_THICKNESS * 3;
private readonly Circle outerFill;
private readonly Circle outerGradient;
private readonly Circle innerGradient;
private readonly Circle innerFill;
@ -41,7 +42,7 @@ namespace osu.Game.Rulesets.Osu.Skinning.Argon
[Resolved]
private DrawableHitObject drawableObject { get; set; } = null!;
public ArgonMainCirclePiece()
public ArgonMainCirclePiece(bool withOuterFill)
{
Size = new Vector2(OsuHitObject.OBJECT_RADIUS * 2);
@ -52,6 +53,11 @@ namespace osu.Game.Rulesets.Osu.Skinning.Argon
InternalChildren = new Drawable[]
{
outerFill = new Circle // renders white outer border and dark fill
{
Size = Size,
Alpha = withOuterFill ? 1 : 0,
},
outerGradient = new Circle // renders the outer bright gradient
{
Size = new Vector2(OUTER_GRADIENT_SIZE),
@ -101,7 +107,7 @@ namespace osu.Game.Rulesets.Osu.Skinning.Argon
accentColour.BindValueChanged(colour =>
{
innerFill.Colour = colour.NewValue.Darken(4);
outerFill.Colour = innerFill.Colour = colour.NewValue.Darken(4);
outerGradient.Colour = ColourInfo.GradientVertical(colour.NewValue, colour.NewValue.Darken(0.1f));
innerGradient.Colour = ColourInfo.GradientVertical(colour.NewValue.Darken(0.5f), colour.NewValue.Darken(0.6f));
flash.Colour = colour.NewValue;
@ -134,6 +140,7 @@ namespace osu.Game.Rulesets.Osu.Skinning.Argon
// The fill layers add too much noise during the explosion animation.
// They will be hidden by the additive effects anyway.
outerFill.FadeOut(flash_in_duration, Easing.OutQuint);
innerFill.FadeOut(flash_in_duration, Easing.OutQuint);
// The inner-most gradient should actually be resizing, but is only visible for

View File

@ -28,8 +28,10 @@ namespace osu.Game.Rulesets.Osu.Skinning.Argon
switch (osuComponent.Component)
{
case OsuSkinComponents.HitCircle:
return new ArgonMainCirclePiece(true);
case OsuSkinComponents.SliderHeadHitCircle:
return new ArgonMainCirclePiece();
return new ArgonMainCirclePiece(false);
case OsuSkinComponents.SliderBody:
return new ArgonSliderBody();