public void AddHistoryRow(XsollaTranslations pTranslation, XsollaHistoryItem pItem, Boolean pEven, Boolean pHeader = false) { Logger.Log("AddHistoryRow"); GameObject itemRow = Instantiate(Resources.Load(PREFAB_HISTORY_ROW)) as GameObject; HistoryElemController controller = itemRow.GetComponent <HistoryElemController>(); if (controller != null) { if (pHeader) { controller.Init(pTranslation, null, mVirtCurrName, pEven, SortHistory, true, sortDesc); } else { controller.Init(pTranslation, pItem, mVirtCurrName, pEven, null); } } itemRow.transform.SetParent(mHistoryContainer.transform); }
/// <summary> /// Adds the header row. /// </summary> private void AddHeader() { GameObject itemRow = Instantiate(Resources.Load(PREFAB_HISTORY_ROW)) as GameObject; HistoryElemController controller = itemRow.GetComponent <HistoryElemController>(); controller.Init(mUtils, null, false, SortHistory, true, mSortDesc); itemRow.transform.SetParent(mHistoryContainer.transform); Resizer.SetDefScale(itemRow); MoveProgresBarOnLastChild(); }
/// <summary> /// Adds the history row. /// </summary> /// <param name="pItem">P history row.</param> private void AddHistoryRow(XsollaHistoryItem pItem) { GameObject itemRow = Instantiate(Resources.Load(PREFAB_HISTORY_ROW)) as GameObject; HistoryElemController controller = itemRow.GetComponent <HistoryElemController>(); if (controller != null) { controller.Init(mUtils, pItem, (mList.Count + 1) % 2 != 0, null); } itemRow.transform.SetParent(mHistoryContainer.transform); Resizer.SetDefScale(itemRow); MoveProgresBarOnLastChild(); mList.Add(controller); }