mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:17:23 +08:00
Add support for animated colour fill in new style legacy health bar
This commit is contained in:
parent
91e4397bd9
commit
876a357bf2
@ -148,9 +148,9 @@ namespace osu.Game.Skinning
|
||||
}
|
||||
}
|
||||
|
||||
internal class LegacyOldStyleFill : LegacyHealthPiece
|
||||
internal abstract class LegacyFill : LegacyHealthPiece
|
||||
{
|
||||
public LegacyOldStyleFill(ISkin skin)
|
||||
protected LegacyFill(ISkin skin)
|
||||
{
|
||||
// required for sizing correctly..
|
||||
var firstFrame = getTexture(skin, "colour-0");
|
||||
@ -166,23 +166,25 @@ namespace osu.Game.Skinning
|
||||
Size = new Vector2(firstFrame.DisplayWidth, firstFrame.DisplayHeight);
|
||||
}
|
||||
|
||||
Position = new Vector2(3, 10) * 1.6f;
|
||||
Masking = true;
|
||||
}
|
||||
}
|
||||
|
||||
internal class LegacyNewStyleFill : LegacyHealthPiece
|
||||
internal class LegacyOldStyleFill : LegacyFill
|
||||
{
|
||||
public LegacyOldStyleFill(ISkin skin)
|
||||
: base(skin)
|
||||
{
|
||||
Position = new Vector2(3, 10) * 1.6f;
|
||||
}
|
||||
}
|
||||
|
||||
internal class LegacyNewStyleFill : LegacyFill
|
||||
{
|
||||
public LegacyNewStyleFill(ISkin skin)
|
||||
: base(skin)
|
||||
{
|
||||
InternalChild = new Sprite
|
||||
{
|
||||
Texture = getTexture(skin, "colour"),
|
||||
};
|
||||
|
||||
Size = InternalChild.Size;
|
||||
Position = new Vector2(7.5f, 7.8f) * 1.6f;
|
||||
Masking = true;
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
|
Loading…
Reference in New Issue
Block a user