public static void LabelField(StringValueLabel value, float width) { var label = Obj.Instantiate(I.labelPrefab.gameObject, parent).GetComponent <Text>(); var rt = label.rectTransform; rt.sizeDelta = rt.sizeDelta.SetX(width); label.text = value.value; value.label = label; var wrapper = new LabelWrapper(label, value); label.color = labelColor; horizon.Add(label); }
public LabelWrapper(Text f, StringValueLabel v) { label = f; value = v; }
public static void LabelField(StringValueLabel value) { LabelField(value, (I.labelPrefab.transform as RectTransform).rect.width); }