mirror of
https://github.com/rmroc451/TweaksAndThings.git
synced 2025-12-18 18:29:38 -06:00
2.0.0 feature updates
This commit is contained in:
@@ -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}>";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user