mirror of
https://github.com/ppy/osu.git
synced 2025-01-23 22:13:02 +08:00
Fix osu!catch fruits not resizing on texture change
This commit is contained in:
parent
e79604cc13
commit
30fb3c3999
@ -85,9 +85,25 @@ namespace osu.Game.Rulesets.Catch.Skinning.Legacy
|
|||||||
|
|
||||||
protected void SetTexture(Texture? texture, Texture? overlayTexture)
|
protected void SetTexture(Texture? texture, Texture? overlayTexture)
|
||||||
{
|
{
|
||||||
|
// Sizes are reset due to an arguable osu!framework bug where Sprite retains the size of the first set texture.
|
||||||
|
|
||||||
|
if (colouredSprite.Texture != texture)
|
||||||
|
{
|
||||||
|
colouredSprite.Size = Vector2.Zero;
|
||||||
colouredSprite.Texture = texture;
|
colouredSprite.Texture = texture;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (overlaySprite.Texture != overlayTexture)
|
||||||
|
{
|
||||||
|
overlaySprite.Size = Vector2.Zero;
|
||||||
overlaySprite.Texture = overlayTexture;
|
overlaySprite.Texture = overlayTexture;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (hyperSprite.Texture != texture)
|
||||||
|
{
|
||||||
|
hyperSprite.Size = Vector2.Zero;
|
||||||
hyperSprite.Texture = texture;
|
hyperSprite.Texture = texture;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user