public override ScrollViewCell CreateCell(RecycleScrollView scrollView, AssetConfig config, int cellIndex) { BaseCell cell = (BaseCell)scrollView.CreateCell(_cellIdentifier); cell.SetText(DisplayText); cell.SetHeaderOffset(LogConsoleSettings.GetTreeViewOffsetByLevel(level)); cell.SetBackgroundColor(LogConsoleSettings.GetCellColor(cellIndex)); _cellControl.UpdateData(cell); return(cell); }
public ScrollViewCell ScrollCellCreated(int cellIndex) { if (cellIndex < 0 || cellIndex >= _filterLogInfos.Count) { throw new Exception("Cell index is out of range: " + cellIndex); } ScrollViewCell cell = _scrollView.CreateCell("LogCell"); return(cell); }
public override ScrollViewCell CreateCell(RecycleScrollView scrollView, AssetConfig config, int cellIndex) { BaseGenericCell cell = (BaseGenericCell)scrollView.CreateCell(CellIdentifier()); cell.SetText(DisplayText); cell.SetHeaderOffset(LogConsoleSettings.GetTreeViewOffsetByLevel(level)); cell.SetBackgroundColor(LogConsoleSettings.GetCellColor(cellIndex)); AssetConfig.SpriteInfo spriteInfo = config.GetSpriteInfo(icon); if (spriteInfo != null) { cell.SetIcon(spriteInfo.sprite); cell.SetIconColor(iconColor != Color.white ? iconColor : spriteInfo.color); } else { cell.SetIcon(null); } return(cell); }
public override ScrollViewCell CreateCell(RecycleScrollView scrollView, AssetConfig config, int cellIndex) { string cellId = resizable ? "GenericResizableCell" : "GenericCell"; BaseGenericCell cell = (BaseGenericCell)scrollView.CreateCell(cellId); cell.SetText(DisplayText); cell.SetHeaderOffset(LogConsoleSettings.GetTreeViewOffsetByLevel(level)); cell.SetBackgroundColor(LogConsoleSettings.GetCellColor(cellIndex)); AssetConfig.SpriteInfo spriteInfo = config.GetSpriteInfo((isExpanded || string.IsNullOrEmpty(iconClose)) ? icon : iconClose); if (spriteInfo != null) { cell.SetIcon(spriteInfo.sprite); cell.SetIconColor(iconColor != Color.white ? iconColor : spriteInfo.color); } else { cell.SetIcon(null); } return(cell); }