mirror of
https://github.com/ppy/osu.git
synced 2025-01-18 14:43:22 +08:00
Merge pull request #31254 from peppy/fix-invisible-circle-sprites
Fix some hitcircle sprites missing in certain skins since last release
This commit is contained in:
commit
6b56c658b3
@ -61,13 +61,16 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
|
|||||||
|
|
||||||
var drawableOsuObject = (DrawableOsuHitObject?)drawableObject;
|
var drawableOsuObject = (DrawableOsuHitObject?)drawableObject;
|
||||||
|
|
||||||
// As a precondition, ensure that any prefix lookups are run against the skin which is providing "hitcircle".
|
// As a precondition, prefer that any *prefix* lookups are run against the skin which is providing "hitcircle".
|
||||||
// This is to correctly handle a case such as:
|
// This is to correctly handle a case such as:
|
||||||
//
|
//
|
||||||
// - Beatmap provides `hitcircle`
|
// - Beatmap provides `hitcircle`
|
||||||
// - User skin provides `sliderstartcircle`
|
// - User skin provides `sliderstartcircle`
|
||||||
//
|
//
|
||||||
// In such a case, the `hitcircle` should be used for slider start circles rather than the user's skin override.
|
// In such a case, the `hitcircle` should be used for slider start circles rather than the user's skin override.
|
||||||
|
//
|
||||||
|
// Of note, this consideration should only be used to decide whether to continue looking up the prefixed name or not.
|
||||||
|
// The final lookups must still run on the full skin hierarchy as per usual in order to correctly handle fallback cases.
|
||||||
var provider = skin.FindProvider(s => s.GetTexture(base_lookup) != null) ?? skin;
|
var provider = skin.FindProvider(s => s.GetTexture(base_lookup) != null) ?? skin;
|
||||||
|
|
||||||
// if a base texture for the specified prefix exists, continue using it for subsequent lookups.
|
// if a base texture for the specified prefix exists, continue using it for subsequent lookups.
|
||||||
@ -81,7 +84,7 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
|
|||||||
// expected behaviour in this scenario is not showing the overlay, rather than using hitcircleoverlay.png.
|
// expected behaviour in this scenario is not showing the overlay, rather than using hitcircleoverlay.png.
|
||||||
InternalChildren = new[]
|
InternalChildren = new[]
|
||||||
{
|
{
|
||||||
CircleSprite = new LegacyKiaiFlashingDrawable(() => new Sprite { Texture = provider.GetTexture(circleName)?.WithMaximumSize(maxSize) })
|
CircleSprite = new LegacyKiaiFlashingDrawable(() => new Sprite { Texture = skin.GetTexture(circleName)?.WithMaximumSize(maxSize) })
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
@ -90,7 +93,7 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
|
|||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Child = OverlaySprite = new LegacyKiaiFlashingDrawable(() => new Sprite { Texture = provider.GetTexture(@$"{circleName}overlay")?.WithMaximumSize(maxSize) })
|
Child = OverlaySprite = new LegacyKiaiFlashingDrawable(() => new Sprite { Texture = skin.GetTexture(@$"{circleName}overlay")?.WithMaximumSize(maxSize) })
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
|
Loading…
Reference in New Issue
Block a user