Esempio n. 1
0
    public void SetRows(Dictionary <string, string>[] rows)
    {
        // For each element present on the array, create a new row holder element and set the rowPivot as its parent.
        for (int i = 0; i < rows.Length; i++)
        {
            GameObject newRowHolder = UICreator.GetNewRow(rowPivot);

            // For each entry present on the dictionary at [i], create a new text and set the previously created row holder as its parent.
            foreach (KeyValuePair <string, string> entry in rows[i])
            {
                Text rowText = UICreator.GetNewText(newRowHolder.transform, false);
                rowText.text = entry.Value;
            }
        }
    }