コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }