mirror of
https://github.com/ppy/osu.git
synced 2025-02-12 13:22:56 +08:00
Merge pull request #13455 from bdach/new-style-fill-animation
Add support for animated colour fill in new style legacy health bar
This commit is contained in:
commit
45480498d7
BIN
osu.Game.Tests/Resources/special-skin/scorebar-bg.png
Normal file
BIN
osu.Game.Tests/Resources/special-skin/scorebar-bg.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 250 B |
BIN
osu.Game.Tests/Resources/special-skin/scorebar-colour-0.png
Normal file
BIN
osu.Game.Tests/Resources/special-skin/scorebar-colour-0.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
BIN
osu.Game.Tests/Resources/special-skin/scorebar-colour-1.png
Normal file
BIN
osu.Game.Tests/Resources/special-skin/scorebar-colour-1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
BIN
osu.Game.Tests/Resources/special-skin/scorebar-colour-2.png
Normal file
BIN
osu.Game.Tests/Resources/special-skin/scorebar-colour-2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
BIN
osu.Game.Tests/Resources/special-skin/scorebar-colour-3.png
Normal file
BIN
osu.Game.Tests/Resources/special-skin/scorebar-colour-3.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
BIN
osu.Game.Tests/Resources/special-skin/scorebar-marker.png
Normal file
BIN
osu.Game.Tests/Resources/special-skin/scorebar-marker.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 126 B |
@ -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..
|
// required for sizing correctly..
|
||||||
var firstFrame = getTexture(skin, "colour-0");
|
var firstFrame = getTexture(skin, "colour-0");
|
||||||
@ -162,27 +162,29 @@ namespace osu.Game.Skinning
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
InternalChild = skin.GetAnimation("scorebar-colour", true, true, startAtCurrentTime: false, applyConfigFrameRate: true) ?? Drawable.Empty();
|
InternalChild = skin.GetAnimation("scorebar-colour", true, true, startAtCurrentTime: false, applyConfigFrameRate: true) ?? Empty();
|
||||||
Size = new Vector2(firstFrame.DisplayWidth, firstFrame.DisplayHeight);
|
Size = new Vector2(firstFrame.DisplayWidth, firstFrame.DisplayHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
Position = new Vector2(3, 10) * 1.6f;
|
|
||||||
Masking = true;
|
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)
|
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;
|
Position = new Vector2(7.5f, 7.8f) * 1.6f;
|
||||||
Masking = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Update()
|
protected override void Update()
|
||||||
|
Loading…
Reference in New Issue
Block a user