//Will be called by the TableView when a cell needs to be created for display public TableViewCell GetCellForRowInTableView(TableView tableView, int row) { DynamicHeightCell cell = tableView.GetReusableCell(m_cellPrefab.reuseIdentifier) as DynamicHeightCell; if (cell == null) { cell = (DynamicHeightCell)GameObject.Instantiate(m_cellPrefab); cell.name = "DynamicHeightCellInstance_" + (++m_numInstancesCreated).ToString(); cell.onCellHeightChanged.AddListener(OnCellHeightChanged); } cell.rowNumber = row; cell.height = GetHeightOfRow(row); return(cell); }
// Token: 0x060044E8 RID: 17640 RVA: 0x00170D44 File Offset: 0x0016F144 public TableViewCell GetCellForRowInTableView(TableView tableView, int row) { DynamicHeightCell dynamicHeightCell = tableView.GetReusableCell(this.m_cellPrefab.reuseIdentifier) as DynamicHeightCell; if (dynamicHeightCell == null) { dynamicHeightCell = UnityEngine.Object.Instantiate <DynamicHeightCell>(this.m_cellPrefab); UnityEngine.Object @object = dynamicHeightCell; string str = "DynamicHeightCellInstance_"; int num = ++this.m_numInstancesCreated; @object.name = str + num.ToString(); dynamicHeightCell.onCellHeightChanged.AddListener(new UnityAction <int, float>(this.OnCellHeightChanged)); } dynamicHeightCell.rowNumber = row; dynamicHeightCell.height = this.GetHeightOfRow(row); return(dynamicHeightCell); }
//Will be called by the TableView when a cell needs to be created for display public TableViewCell GetCellForRowInTableView(TableView tableView, int row) { DynamicHeightCell cell = tableView.GetReusableCell(m_cellPrefab.reuseIdentifier) as DynamicHeightCell; if (cell == null) { cell = (DynamicHeightCell)GameObject.Instantiate(m_cellPrefab); cell.name = "DynamicHeightCellInstance_" + (++m_numInstancesCreated).ToString(); cell.onCellHeightChanged.AddListener(OnCellHeightChanged); } cell.rowNumber = row + 1; if (m_numRows == 0) { if (this.memoriaArray.Count > 0) { cell.acertos = this.memoriaArray[row].pontosAcertos; cell.erros = this.memoriaArray[row].pontosErro; cell.total = this.memoriaArray[row].pontosTotal; } } if (m_numRows == 1) { if (this.aprendizagemArray.Count > 0) { cell.acertos = this.aprendizagemArray[row].pontosAcertos; cell.erros = this.aprendizagemArray[row].pontosErro; cell.total = this.aprendizagemArray[row].pontosTotal; } } if (m_numRows == 2) { if (this.atencaoArray.Count > 0) { cell.acertos = this.atencaoArray[row].pontosAcertos; cell.erros = this.atencaoArray[row].pontosErro; cell.total = this.atencaoArray[row].pontosTotal; } } cell.height = GetHeightOfRow(row); return(cell); }