1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 19:04:06 +08:00

Make Thickness property auto

This commit is contained in:
Andrei Zavatski 2022-11-21 10:32:19 +03:00
parent 14a4de36f4
commit ec8532951c

View File

@ -45,20 +45,7 @@ namespace osu.Game.Graphics.Backgrounds
set => colourBottom.Value = value;
}
private float thickness = 0.02f;
public float Thickness
{
get => thickness;
set
{
if (thickness == value)
return;
thickness = value;
// No need for invalidation since it's happening in Update()
}
}
public float Thickness { get; set; } = 0.02f; // No need for invalidation since it's happening in Update()
/// <summary>
/// Whether we should create new triangles as others expire.
@ -257,7 +244,7 @@ namespace osu.Game.Graphics.Backgrounds
shader = Source.shader;
texture = Source.texture;
size = Source.DrawSize;
thickness = Source.thickness;
thickness = Source.Thickness;
parts.Clear();
parts.AddRange(Source.parts);