mirror of
https://github.com/osukey/osukey.git
synced 2025-05-29 17:37:23 +09:00
Ensure scorebar marker lookup is performed on the source the background is retrieved from
This commit is contained in:
parent
b5f145cfa9
commit
e10dfab2e8
@ -35,7 +35,10 @@ namespace osu.Game.Skinning
|
|||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Both;
|
AutoSizeAxes = Axes.Both;
|
||||||
|
|
||||||
isNewStyle = getTexture(skin, "marker") != null;
|
var backgroundSource = skin.FindProvider(s => getTexture(s, "bg") != null);
|
||||||
|
|
||||||
|
// the marker lookup to decide which display style must be performed on the source of the bg, which is the most common element.
|
||||||
|
isNewStyle = getTexture(backgroundSource, "marker") != null;
|
||||||
|
|
||||||
// background implementation is the same for both versions.
|
// background implementation is the same for both versions.
|
||||||
AddInternal(new Sprite { Texture = getTexture(skin, "bg") });
|
AddInternal(new Sprite { Texture = getTexture(skin, "bg") });
|
||||||
@ -76,7 +79,7 @@ namespace osu.Game.Skinning
|
|||||||
|
|
||||||
protected override void Flash(JudgementResult result) => marker.Flash(result);
|
protected override void Flash(JudgementResult result) => marker.Flash(result);
|
||||||
|
|
||||||
private static Texture getTexture(ISkinSource skin, string name) => skin.GetTexture($"scorebar-{name}");
|
private static Texture getTexture(ISkin skin, string name) => skin?.GetTexture($"scorebar-{name}");
|
||||||
|
|
||||||
private static Color4 getFillColour(double hp)
|
private static Color4 getFillColour(double hp)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user