public TableCell CellForIdx(int row) { LevelListTableCell cell = Instantiate(_songTableCellInstance); cell.reuseIdentifier = "SongCell"; cell.GetField <UnityEngine.UI.Image>("_coverImage").sprite = availableFiles[row].CoverImage; cell.GetField <TextMeshProUGUI>("_songNameText").text = availableFiles[row].FileName; cell.GetField <TextMeshProUGUI>("_authorText").text = ""; cell.SetField("_beatmapCharacteristicAlphas", new float[0]); cell.SetField("_beatmapCharacteristicImages", new UnityEngine.UI.Image[0]); cell.SetField("_bought", true); return(cell); }
public TableCell CellForIdx(TableView tableView, int row) { LevelListTableCell cell = Instantiate(_songTableCellInstance); IPreviewBeatmapLevel song = availableSongs[row].PreviewBeatmap; cell.reuseIdentifier = "SongCell"; cell.SetDataFromLevelAsync(song, false); cell.SetField("_bought", true); return(cell); }
public TableCell CellForIdx(TableView tableView, int row) { LevelListTableCell _tableCell = Instantiate(_requestListTableCellInstance); _tableCell.reuseIdentifier = "RequestBotSongCell"; _tableCell.SetField("_notOwned", false); SongRequest request = SongInfoForRow(row); SetDataFromLevelAsync(request, _tableCell, row); return(_tableCell); }
//////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// /// <summary> /// Get new table cell or reuse old one /// </summary> /// <returns></returns> private LevelListTableCell GetTableCell() { LevelListTableCell l_Cell = (LevelListTableCell)TableViewInstance.DequeueReusableCellForIdentifier("BSP_SongList_Cell"); if (!l_Cell) { if (m_SongListTableCellInstance == null) { m_SongListTableCellInstance = UnityEngine.Resources.FindObjectsOfTypeAll <LevelListTableCell>().First(x => (x.name == "LevelListTableCell")); } l_Cell = Instantiate(m_SongListTableCellInstance); } l_Cell.SetField("_notOwned", false); l_Cell.reuseIdentifier = "BSP_SongList_Cell"; if (m_DefaultCover == null) { m_DefaultCover = l_Cell.GetField <UnityEngine.UI.Image, LevelListTableCell>("_coverImage").sprite; } return(l_Cell); }