예제 #1
0
 void Start()
 {
     if (!Overlord)
     {
         Overlord = FindObjectOfType <SW_Table_Overlord>();
     }
     if (!TableRaycaster)
     {
         TableRaycaster = GetComponent <GraphicRaycaster>();
     }
     if (Columns.Count == 0)
     {
         GetColumnsFromTitleRow();
     }
 }
예제 #2
0
 public void Initialize(SW_Column column, string text, SW_Table_Overlord overlord, SW_Row row)
 {
     layout = GetComponent <LayoutElement>();
     textUI = GetComponentInChildren <TextMeshProUGUI>();
     if (!textUI)
     {
         textUI = GetComponent <TextMeshProUGUI>();
     }
     Overlord        = overlord;
     itemRow         = row;
     textUI.text     = text;
     Value           = text;
     layout.minWidth = column.minWidth;
     if (column.flexWidth)
     {
         layout.flexibleWidth = 1;
     }
 }
예제 #3
0
 public void Initialize(float min, bool flex, string text, SW_Table_Overlord overlord, SW_Row row, string navigationString)
 {
     layout = GetComponent <LayoutElement>();
     textUI = GetComponentInChildren <TextMeshProUGUI>();
     if (!textUI)
     {
         textUI = GetComponent <TextMeshProUGUI>();
     }
     Overlord        = overlord;
     itemRow         = row;
     textUI.text     = text;
     Value           = text;
     layout.minWidth = min;
     if (flex)
     {
         layout.flexibleWidth = 1;
     }
     NavString = navigationString;
 }
예제 #4
0
 void Awake()
 {
     if (!dataController)
     {
         dataController = FindObjectOfType <SW_DataController>();
     }
     if (!overlord)
     {
         overlord = FindObjectOfType <SW_Table_Overlord>();
     }
     if (!rTransform)
     {
         rTransform = GetComponent <RectTransform>();
     }
     if (!sizeFitter)
     {
         sizeFitter = GetComponent <ContentSizeFitter>();
     }
 }