Add button content setting and fix other issues with custom color settings

This commit is contained in:
2025-09-11 20:57:31 -07:00
parent 970a2be8e1
commit ff2acc233e
17 changed files with 553 additions and 405 deletions

View File

@@ -126,6 +126,28 @@ public class CustomColorObject : MonoBehaviour
currentColor.b = colorType.b;
obj2.color = currentColor;
break;
case ColorObjectType.ButtonContentColorImage:
color = BazookaManager.Instance.GetColorSettingButtonContent();
colorType = new((int)color[0] / 255f, (int)color[1] / 255f, (int)color[2] / 255f);
colorType = ApplyModifiers(colorType);
obj2 = gameObject.GetComponent<Image>();
currentColor = obj2.color;
currentColor.r = colorType.r;
currentColor.g = colorType.g;
currentColor.b = colorType.b;
obj2.color = currentColor;
break;
case ColorObjectType.ButtonContentColorText:
color = BazookaManager.Instance.GetColorSettingButtonContent();
colorType = new((int)color[0] / 255f, (int)color[1] / 255f, (int)color[2] / 255f);
colorType = ApplyModifiers(colorType);
obj3 = gameObject.GetComponent<TMP_Text>();
currentColor = obj3.color;
currentColor.r = colorType.r;
currentColor.g = colorType.g;
currentColor.b = colorType.b;
obj3.color = currentColor;
break;
}
}