mirror of
https://github.com/ppy/osu.git
synced 2025-03-15 22:37:21 +08:00
Merge pull request #14939 from bdach/hitcircle-overlay-above-number-proxying
Fix slider head hit circle numbers not being proxied correctly
This commit is contained in:
commit
75c4d140c9
Binary file not shown.
Before Width: | Height: | Size: 241 KiB After Width: | Height: | Size: 26 KiB |
@ -0,0 +1,3 @@
|
||||
[General]
|
||||
Version: latest
|
||||
HitCircleOverlayAboveNumber: 0
|
@ -35,8 +35,9 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
|
||||
|
||||
private Drawable hitCircleSprite;
|
||||
|
||||
protected Drawable HitCircleOverlay { get; private set; }
|
||||
protected Container OverlayLayer { get; private set; }
|
||||
|
||||
private Drawable hitCircleOverlay;
|
||||
private SkinnableSpriteText hitCircleText;
|
||||
|
||||
private readonly Bindable<Color4> accentColour = new Bindable<Color4>();
|
||||
@ -78,17 +79,22 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
},
|
||||
HitCircleOverlay = new KiaiFlashingSprite
|
||||
OverlayLayer = new Container
|
||||
{
|
||||
Texture = overlayTexture,
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
},
|
||||
Child = hitCircleOverlay = new KiaiFlashingSprite
|
||||
{
|
||||
Texture = overlayTexture,
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
if (hasNumber)
|
||||
{
|
||||
AddInternal(hitCircleText = new SkinnableSpriteText(new OsuSkinComponent(OsuSkinComponents.HitCircleText), _ => new OsuSpriteText
|
||||
OverlayLayer.Add(hitCircleText = new SkinnableSpriteText(new OsuSkinComponent(OsuSkinComponents.HitCircleText), _ => new OsuSpriteText
|
||||
{
|
||||
Font = OsuFont.Numeric.With(size: 40),
|
||||
UseFullGlyphHeight = false,
|
||||
@ -102,7 +108,7 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
|
||||
bool overlayAboveNumber = skin.GetConfig<OsuSkinConfiguration, bool>(OsuSkinConfiguration.HitCircleOverlayAboveNumber)?.Value ?? true;
|
||||
|
||||
if (overlayAboveNumber)
|
||||
ChangeInternalChildDepth(HitCircleOverlay, float.MinValue);
|
||||
OverlayLayer.ChangeChildDepth(hitCircleOverlay, float.MinValue);
|
||||
|
||||
accentColour.BindTo(drawableObject.AccentColour);
|
||||
indexInCurrentCombo.BindTo(drawableOsuObject.IndexInCurrentComboBindable);
|
||||
@ -147,8 +153,8 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
|
||||
hitCircleSprite.FadeOut(legacy_fade_duration, Easing.Out);
|
||||
hitCircleSprite.ScaleTo(1.4f, legacy_fade_duration, Easing.Out);
|
||||
|
||||
HitCircleOverlay.FadeOut(legacy_fade_duration, Easing.Out);
|
||||
HitCircleOverlay.ScaleTo(1.4f, legacy_fade_duration, Easing.Out);
|
||||
hitCircleOverlay.FadeOut(legacy_fade_duration, Easing.Out);
|
||||
hitCircleOverlay.ScaleTo(1.4f, legacy_fade_duration, Easing.Out);
|
||||
|
||||
if (hasNumber)
|
||||
{
|
||||
|
@ -14,7 +14,7 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
|
||||
[Resolved(canBeNull: true)]
|
||||
private DrawableHitObject drawableHitObject { get; set; }
|
||||
|
||||
private Drawable proxiedHitCircleOverlay;
|
||||
private Drawable proxiedOverlayLayer;
|
||||
|
||||
public LegacySliderHeadHitCircle()
|
||||
: base("sliderstartcircle")
|
||||
@ -24,7 +24,7 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
proxiedHitCircleOverlay = HitCircleOverlay.CreateProxy();
|
||||
proxiedOverlayLayer = OverlayLayer.CreateProxy();
|
||||
|
||||
if (drawableHitObject != null)
|
||||
{
|
||||
@ -35,11 +35,11 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
|
||||
|
||||
private void onHitObjectApplied(DrawableHitObject drawableObject)
|
||||
{
|
||||
Debug.Assert(proxiedHitCircleOverlay.Parent == null);
|
||||
Debug.Assert(proxiedOverlayLayer.Parent == null);
|
||||
|
||||
// see logic in LegacyReverseArrow.
|
||||
(drawableObject as DrawableSliderHead)?.DrawableSlider
|
||||
.OverlayElementContainer.Add(proxiedHitCircleOverlay.With(d => d.Depth = float.MinValue));
|
||||
.OverlayElementContainer.Add(proxiedOverlayLayer.With(d => d.Depth = float.MinValue));
|
||||
}
|
||||
|
||||
protected override void Dispose(bool isDisposing)
|
||||
|
Loading…
x
Reference in New Issue
Block a user