void Start() { if (!Overlord) { Overlord = FindObjectOfType <SW_Table_Overlord>(); } if (!TableRaycaster) { TableRaycaster = GetComponent <GraphicRaycaster>(); } if (Columns.Count == 0) { GetColumnsFromTitleRow(); } }
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; } }
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; }
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>(); } }