/// <summary> /// Get the number of rows that a certain table should display /// </summary> public int GetNumberOfRowsForTableView(Tacticsoft.TableView tableView) { if (sessionList != null) { return(sessionList.Length); } else { return(0); } }
//Will be called by the TableView when a cell needs to be created for display public Tacticsoft.TableViewCell GetCellForRowInTableView(Tacticsoft.TableView tableView, int row) { LevelSelectCell cell = tableView.GetReusableCell(m_cellPrefab.reuseIdentifier) as LevelSelectCell; if (cell == null) { cell = (LevelSelectCell)GameObject.Instantiate(m_cellPrefab); cell.name = "LevelSelectCellInstance_" + row.ToString(); } cell.SetLevelName(filesList [row].Key); cell.SetLevelPath(filesList [row].Value); return(cell); }
/// <summary> /// Create a cell for a certain row in a table view. /// Callers should use tableView.GetReusableCell to cache objects /// </summary> public Tacticsoft.TableViewCell GetCellForRowInTableView(Tacticsoft.TableView tableView, int row) { SessionCell cell = tableView.GetReusableCell(m_cellPrefab.reuseIdentifier) as SessionCell; if (cell == null) { cell = (SessionCell)GameObject.Instantiate(m_cellPrefab); cell.name = "VisibleCounterCellInstance_" + (++m_numInstancesCreated).ToString(); } cell.tableClickController = this; cell.rowNumber = row; cell.sessionInfo = sessionList [row]; return(cell); }
//Will be called by the TableView to know what is the height of each row public float GetHeightForRowInTableView(Tacticsoft.TableView tableView, int row) { return((m_cellPrefab.transform as RectTransform).rect.height); }
//Will be called by the TableView to know how many rows are in this table public int GetNumberOfRowsForTableView(Tacticsoft.TableView tableView) { return(filesList.Count); }
/// <summary> /// Get the height of a row of a certain cell in the table view /// </summary> public float GetHeightForRowInTableView(Tacticsoft.TableView tableView, int row) { return(50.0f); }