ui基本完毕,修了一大把的bug

This commit is contained in:
2026-07-13 02:28:39 +08:00
parent 1e20d73e90
commit fd22501f71
958 changed files with 378289 additions and 41038 deletions
+6 -4
View File
@@ -23,6 +23,8 @@ public class UI_Idols : MonoBehaviour
[Header("colors")]
public Color[] idolSliderColors;
public Color statIncreaseColor = new Color32(0x7C, 0xFF, 0x6B, 0xFF);
public Color statDecreaseColor = new Color32(0xFF, 0x5A, 0x5A, 0xFF);
[Header("paths")]
public string idolSOpath_runtime;
@@ -986,7 +988,7 @@ public class UI_Idols : MonoBehaviour
return Mathf.RoundToInt(value * 100f) + "%";
}
private static string FormatGrowthInt(int baseValue, int effectiveValue)
private string FormatGrowthInt(int baseValue, int effectiveValue)
{
int growth = effectiveValue - baseValue;
if (growth == 0)
@@ -995,11 +997,11 @@ public class UI_Idols : MonoBehaviour
}
string sign = growth > 0 ? "+" : "-";
string color = growth > 0 ? "#7CFF6B" : "#FF5A5A";
string color = "#" + ColorUtility.ToHtmlStringRGB(growth > 0 ? statIncreaseColor : statDecreaseColor);
return $"{baseValue} <color={color}>{sign} {Mathf.Abs(growth)}</color>";
}
private static string FormatGrowthPercent(float baseValue, float effectiveValue)
private string FormatGrowthPercent(float baseValue, float effectiveValue)
{
float growth = effectiveValue - baseValue;
string baseText = FormatPercent(baseValue);
@@ -1009,7 +1011,7 @@ public class UI_Idols : MonoBehaviour
}
string sign = growth > 0f ? "+" : "-";
string color = growth > 0f ? "#7CFF6B" : "#FF5A5A";
string color = "#" + ColorUtility.ToHtmlStringRGB(growth > 0f ? statIncreaseColor : statDecreaseColor);
return $"{baseText} <color={color}>{sign} {FormatPercent(Mathf.Abs(growth))}</color>";
}