private void AddCell(string txt) { var cell = Instantiate(cmpCellPrefab, scrollContent.transform); CmpLongButtonUiController longButtonController = cell.GetComponent <CmpLongButtonUiController>(); var longElement = postponedElements["CategoryLongButton"]; longButtonController.SetLocalization(longElement); longButtonController.SetMainText(txt); }
public override void FillView() { ClearScrollContent(); if (CmpLocalizationMapper.shortCategories != null) { foreach (var cat in CmpLocalizationMapper.shortCategories) { var cell = Instantiate(cmpCellPrefab, scrollContent.transform); CmpLongButtonUiController longButtonController = cell.GetComponent <CmpLongButtonUiController>(); var longElement = postponedElements["CategoryButtons"]; longButtonController.SetLocalization(longElement); longButtonController.SetMainText(cat.name); } } ScrollAppear(-800f); }