private static LabeledInformation CreateScore() { LabeledInformation result = LabeledInformation.Create(); result.gameObject.name = "panel_Score"; result.caption = "Score"; SetRectTransformSize(result.gameObject, itemSize_Score); return(result); }
private static LabeledInformation CreateHitPoints() { LabeledInformation result = LabeledInformation.Create(); result.gameObject.name = "panel_HitPoints"; result.caption = "Hit Points"; SetRectTransformSize(result.gameObject, itemSize_HitPoints); return(result); }
private static LabeledInformation CreateLabeledInformation(Buff buff) { LabeledInformation result = LabeledInformation.Create(); result.gameObject.name = itemPrefix + buff.caption; result.caption = buff.caption.Substring(0, shortCaptionLength); result.value = buff.duration.ToString(); return(result); }
public static void Test() { LabeledInformation Li = LabeledInformation.Create(); Li.gameObject.AddComponent <AlignIterator> (); RectTransform rt = Li.gameObject.transform as RectTransform; rt.offsetMin = new Vector2(5, 1); rt.offsetMax = rt.offsetMin + new Vector2(2, 1); Li.caption = "caption"; Li.value = "value"; Li.Rebuild(); }