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 override ScrollViewCell CreateCell(RecycleScrollView scrollView, AssetConfig config, int cellIndex) { BaseCheckboxCell cell = (BaseCheckboxCell)scrollView.CreateCell("CheckboxCell"); cell.SetText(DisplayText); cell.SetHeaderOffset(LogConsoleSettings.GetTreeViewOffsetByLevel(level)); cell.SetBackgroundColor(LogConsoleSettings.GetCellColor(cellIndex)); cell.SetToggle(isOn); cell.OnValueChanged = OnValueChanged; return(cell); }
public override ScrollViewCell CreateCell(RecycleScrollView scrollView, AssetConfig config, int cellIndex) { BaseSliderCell cell = (BaseSliderCell)scrollView.CreateCell("SliderCell"); cell.SetText(DisplayText); cell.SetHeaderOffset(LogConsoleSettings.GetTreeViewOffsetByLevel(level)); cell.SetBackgroundColor(LogConsoleSettings.GetCellColor(cellIndex)); cell.SetConfig(min, max, wholeNumbers); cell.SetValue(value); cell.OnValueChanged = OnValueChanged; return(cell); }
public override ScrollViewCell CreateCell(RecycleScrollView scrollView, AssetConfig config, int cellIndex) { BaseInputCell cell = (BaseInputCell)scrollView.CreateCell("InputCell"); cell.SetText(DisplayText); cell.SetInput(value); cell.SetHeaderOffset(LogConsoleSettings.GetTreeViewOffsetByLevel(level)); cell.SetBackgroundColor(LogConsoleSettings.GetCellColor(cellIndex)); cell.SetIsNumeric(isNumeric); cell.SetReadonly(isReadonly); cell.OnValueChanged = OnValueChanged; 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); }
void UpdateCell(ScrollViewCell cell) { BaseLogCell logCell = cell as BaseLogCell; LogInfo logInfo = _filterLogInfos[logCell.info.index]; AssetConfig.SpriteInfo iconConfig = _assetConfig.GetSpriteInfo(LogTypeToIconName(logInfo.type)); logCell.SetIcon(iconConfig.sprite); logCell.SetIconColor(iconConfig.color); logCell.SetBackgroundColor(LogConsoleSettings.GetCellColor(logCell.info.index)); _cachedText.Length = 0; if (LogConsoleSettings.Instance.showTimestamp) { _cachedText.Append(logInfo.time); } if (LogConsoleSettings.Instance.showLogChannel && logInfo.channelInfo != null) { _cachedText.Append(logInfo.channelInfo.nameWithColor); _cachedText.Append(" "); } _cachedText.Append(logInfo.shortMessage); logCell.SetText(_cachedText.ToString()); if (LogFilter.Instance.IsCollapse) { logCell.SetCollapseEnable(true); logCell.SetCollapseNumber(logInfo.numInstance); } else { logCell.SetCollapseEnable(false); } }