Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 public LabelWrapper(Text f, StringValueLabel v)
 {
     label = f;
     value = v;
 }
Esempio n. 3
0
 public static void LabelField(StringValueLabel value)
 {
     LabelField(value, (I.labelPrefab.transform as RectTransform).rect.width);
 }