2.0.0 feature updates

This commit is contained in:
2025-08-11 00:25:30 -05:00
parent 26a3bdaaa1
commit 7c8becd471
31 changed files with 1054 additions and 211 deletions

View File

@@ -7,7 +7,7 @@ namespace RMROC451.TweaksAndThings.Extensions;
public static class TextSprite_Extensions
{
public static string TriColorPiePercent(this float quantity, float capacity)
public static string TriColorPiePercent(this float quantity, float capacity, string name = "")
{
int num;
if (capacity <= 0f)
@@ -29,6 +29,8 @@ public static class TextSprite_Extensions
color = "#D53427"; //Red
}
return $"<sprite tint=1 color={color} name=Pie{num:D2}>";
string sprite = string.IsNullOrEmpty(name) ? $"Pie{num:D2}" : name;
return $"<sprite tint=1 color={color} name={sprite}>";
}
}