增加UIText扩展组件

This commit is contained in:
monitor1394
2024-12-04 08:19:40 +08:00
parent 7eddebd660
commit 333dfb8e37
3 changed files with 19 additions and 16 deletions

View File

@@ -319,7 +319,7 @@ namespace XCharts.Runtime
chartText.SetActive(textStyle.show);
RectTransform rect = EnsureComponent<RectTransform>(txtObj);
rect.localPosition = Vector3.zero;
rect.anchoredPosition3D = Vector3.zero;
rect.sizeDelta = sizeDelta;
rect.anchorMin = anchorMin;
rect.anchorMax = anchorMax;
@@ -492,7 +492,7 @@ namespace XCharts.Runtime
return label;
}
private static void UpdateAnchorAndPivotByTextAlignment(TextAnchor alignment, out Vector2 anchorMin, out Vector2 anchorMax,
public static void UpdateAnchorAndPivotByTextAlignment(TextAnchor alignment, out Vector2 anchorMin, out Vector2 anchorMax,
out Vector2 pivot)
{
switch (alignment)