1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 14:32:55 +08:00

Remove PathPadding property

This commit is contained in:
Andrei Zavatski 2024-01-12 15:30:16 +03:00
parent e861661037
commit 8d4ba6d466
3 changed files with 5 additions and 73 deletions

View File

@ -84,9 +84,7 @@ namespace osu.Game.Screens.Play.HUD
{
new ArgonHealthDisplayBackground
{
RelativeSizeAxes = Axes.Both,
PathRadius = MAIN_PATH_RADIUS,
PathPadding = MAIN_PATH_RADIUS
RelativeSizeAxes = Axes.Both
},
new Container
{
@ -100,7 +98,6 @@ namespace osu.Game.Screens.Play.HUD
Blending = BlendingParameters.Additive,
Colour = ColourInfo.GradientHorizontal(Color4.White.Opacity(0.8f), Color4.White),
PathRadius = 40f,
PathPadding = 40f,
GlowPortion = 0.9f,
}
},
@ -111,7 +108,6 @@ namespace osu.Game.Screens.Play.HUD
BarColour = main_bar_colour,
GlowColour = main_bar_glow_colour,
PathRadius = MAIN_PATH_RADIUS,
PathPadding = MAIN_PATH_RADIUS,
GlowPortion = 0.6f,
}
}

View File

@ -17,36 +17,6 @@ namespace osu.Game.Screens.Play.HUD.ArgonHealthDisplayParts
{
public partial class ArgonHealthDisplayBackground : Box
{
private float radius = 10f;
public float PathRadius
{
get => radius;
set
{
if (radius == value)
return;
radius = value;
Invalidate(Invalidation.DrawNode);
}
}
private float padding = 10f;
public float PathPadding
{
get => padding;
set
{
if (padding == value)
return;
padding = value;
Invalidate(Invalidation.DrawNode);
}
}
[BackgroundDependencyLoader]
private void load(ShaderManager shaders)
{
@ -65,24 +35,12 @@ namespace osu.Game.Screens.Play.HUD.ArgonHealthDisplayParts
}
private Vector2 size;
private float pathRadius;
private float padding;
public override void ApplyState()
{
base.ApplyState();
size = Source.DrawSize;
pathRadius = Source.PathRadius;
padding = Source.PathPadding;
}
protected override void Draw(IRenderer renderer)
{
if (pathRadius == 0)
return;
base.Draw(renderer);
}
private IUniformBuffer<ArgonBarPathBackgroundParameters> parametersBuffer;
@ -94,9 +52,7 @@ namespace osu.Game.Screens.Play.HUD.ArgonHealthDisplayParts
parametersBuffer ??= renderer.CreateUniformBuffer<ArgonBarPathBackgroundParameters>();
parametersBuffer.Data = new ArgonBarPathBackgroundParameters
{
Size = size,
PathRadius = pathRadius,
Padding = padding
Size = size
};
shader.BindUniformBlock("m_ArgonBarPathBackgroundParameters", parametersBuffer);
@ -114,8 +70,7 @@ namespace osu.Game.Screens.Play.HUD.ArgonHealthDisplayParts
private record struct ArgonBarPathBackgroundParameters
{
public UniformVector2 Size;
public UniformFloat PathRadius;
public UniformFloat Padding;
private readonly UniformPadding8 pad;
}
}
}

View File

@ -50,21 +50,6 @@ namespace osu.Game.Screens.Play.HUD.ArgonHealthDisplayParts
}
}
private float padding = 10f;
public float PathPadding
{
get => padding;
set
{
if (padding == value)
return;
padding = value;
Invalidate(Invalidation.DrawNode);
}
}
private float glowPortion;
public float GlowPortion
@ -130,7 +115,6 @@ namespace osu.Game.Screens.Play.HUD.ArgonHealthDisplayParts
private Vector2 size;
private Vector2 progressRange;
private float pathRadius;
private float padding;
private float glowPortion;
private Color4 barColour;
private Color4 glowColour;
@ -142,7 +126,6 @@ namespace osu.Game.Screens.Play.HUD.ArgonHealthDisplayParts
size = Source.DrawSize;
progressRange = new Vector2(Math.Min(Source.progressRange.X, Source.progressRange.Y), Source.progressRange.Y);
pathRadius = Source.PathRadius;
padding = Source.PathPadding;
glowPortion = Source.GlowPortion;
barColour = Source.barColour;
glowColour = Source.glowColour;
@ -170,8 +153,7 @@ namespace osu.Game.Screens.Play.HUD.ArgonHealthDisplayParts
GlowPortion = glowPortion,
Size = size,
ProgressRange = progressRange,
PathRadius = pathRadius,
Padding = padding
PathRadius = pathRadius
};
shader.BindUniformBlock("m_ArgonBarPathParameters", parametersBuffer);
@ -193,9 +175,8 @@ namespace osu.Game.Screens.Play.HUD.ArgonHealthDisplayParts
public UniformVector2 Size;
public UniformVector2 ProgressRange;
public UniformFloat PathRadius;
public UniformFloat Padding;
public UniformFloat GlowPortion;
private readonly UniformPadding4 pad;
private readonly UniformPadding8 pad;
}
}
}