mirror of
https://github.com/ppy/osu.git
synced 2025-03-16 00:37:19 +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;
|
private Drawable hitCircleSprite;
|
||||||
|
|
||||||
protected Drawable HitCircleOverlay { get; private set; }
|
protected Container OverlayLayer { get; private set; }
|
||||||
|
|
||||||
|
private Drawable hitCircleOverlay;
|
||||||
private SkinnableSpriteText hitCircleText;
|
private SkinnableSpriteText hitCircleText;
|
||||||
|
|
||||||
private readonly Bindable<Color4> accentColour = new Bindable<Color4>();
|
private readonly Bindable<Color4> accentColour = new Bindable<Color4>();
|
||||||
@ -78,17 +79,22 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
|
|||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
},
|
},
|
||||||
HitCircleOverlay = new KiaiFlashingSprite
|
OverlayLayer = new Container
|
||||||
{
|
{
|
||||||
Texture = overlayTexture,
|
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
},
|
Child = hitCircleOverlay = new KiaiFlashingSprite
|
||||||
|
{
|
||||||
|
Texture = overlayTexture,
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
},
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (hasNumber)
|
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),
|
Font = OsuFont.Numeric.With(size: 40),
|
||||||
UseFullGlyphHeight = false,
|
UseFullGlyphHeight = false,
|
||||||
@ -102,7 +108,7 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
|
|||||||
bool overlayAboveNumber = skin.GetConfig<OsuSkinConfiguration, bool>(OsuSkinConfiguration.HitCircleOverlayAboveNumber)?.Value ?? true;
|
bool overlayAboveNumber = skin.GetConfig<OsuSkinConfiguration, bool>(OsuSkinConfiguration.HitCircleOverlayAboveNumber)?.Value ?? true;
|
||||||
|
|
||||||
if (overlayAboveNumber)
|
if (overlayAboveNumber)
|
||||||
ChangeInternalChildDepth(HitCircleOverlay, float.MinValue);
|
OverlayLayer.ChangeChildDepth(hitCircleOverlay, float.MinValue);
|
||||||
|
|
||||||
accentColour.BindTo(drawableObject.AccentColour);
|
accentColour.BindTo(drawableObject.AccentColour);
|
||||||
indexInCurrentCombo.BindTo(drawableOsuObject.IndexInCurrentComboBindable);
|
indexInCurrentCombo.BindTo(drawableOsuObject.IndexInCurrentComboBindable);
|
||||||
@ -147,8 +153,8 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
|
|||||||
hitCircleSprite.FadeOut(legacy_fade_duration, Easing.Out);
|
hitCircleSprite.FadeOut(legacy_fade_duration, Easing.Out);
|
||||||
hitCircleSprite.ScaleTo(1.4f, legacy_fade_duration, Easing.Out);
|
hitCircleSprite.ScaleTo(1.4f, legacy_fade_duration, Easing.Out);
|
||||||
|
|
||||||
HitCircleOverlay.FadeOut(legacy_fade_duration, Easing.Out);
|
hitCircleOverlay.FadeOut(legacy_fade_duration, Easing.Out);
|
||||||
HitCircleOverlay.ScaleTo(1.4f, legacy_fade_duration, Easing.Out);
|
hitCircleOverlay.ScaleTo(1.4f, legacy_fade_duration, Easing.Out);
|
||||||
|
|
||||||
if (hasNumber)
|
if (hasNumber)
|
||||||
{
|
{
|
||||||
|
@ -14,7 +14,7 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
|
|||||||
[Resolved(canBeNull: true)]
|
[Resolved(canBeNull: true)]
|
||||||
private DrawableHitObject drawableHitObject { get; set; }
|
private DrawableHitObject drawableHitObject { get; set; }
|
||||||
|
|
||||||
private Drawable proxiedHitCircleOverlay;
|
private Drawable proxiedOverlayLayer;
|
||||||
|
|
||||||
public LegacySliderHeadHitCircle()
|
public LegacySliderHeadHitCircle()
|
||||||
: base("sliderstartcircle")
|
: base("sliderstartcircle")
|
||||||
@ -24,7 +24,7 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
|
|||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
proxiedHitCircleOverlay = HitCircleOverlay.CreateProxy();
|
proxiedOverlayLayer = OverlayLayer.CreateProxy();
|
||||||
|
|
||||||
if (drawableHitObject != null)
|
if (drawableHitObject != null)
|
||||||
{
|
{
|
||||||
@ -35,11 +35,11 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
|
|||||||
|
|
||||||
private void onHitObjectApplied(DrawableHitObject drawableObject)
|
private void onHitObjectApplied(DrawableHitObject drawableObject)
|
||||||
{
|
{
|
||||||
Debug.Assert(proxiedHitCircleOverlay.Parent == null);
|
Debug.Assert(proxiedOverlayLayer.Parent == null);
|
||||||
|
|
||||||
// see logic in LegacyReverseArrow.
|
// see logic in LegacyReverseArrow.
|
||||||
(drawableObject as DrawableSliderHead)?.DrawableSlider
|
(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)
|
protected override void Dispose(bool isDisposing)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user