static void ChangeTreeViewItemCellGUI( Rect rect, float rowHeight, PendingChangesTreeView treeView, UnityPendingChangesTree pendingChangesTree, ChangeTreeViewItem item, PendingChangesTreeColumn column, bool isSelected, bool isFocused) { PendingChangeInfo changeInfo = item.ChangeInfo; string label = changeInfo.GetColumnText( PendingChangesTreeHeaderState.GetColumnName(column)); if (column == PendingChangesTreeColumn.Item) { if (pendingChangesTree.HasMeta(changeInfo.ChangeInfo)) { label = string.Concat(label, UnityConstants.TREEVIEW_META_LABEL); } Texture icon = GetIcon(changeInfo); GetOverlayIcon.Data overlayIconData = GetOverlayIcon.ForChange(changeInfo.ChangeInfo); bool wasChecked = changeInfo.IsChecked(); bool isChecked = DrawTreeViewItem.ForCheckableItemCell( rect, rowHeight, item.depth, icon, overlayIconData, label, isSelected, isFocused, false, wasChecked); changeInfo.UpdateCheckedState(isChecked); if (wasChecked != isChecked) { UpdateCheckStateForSelection(treeView, item); } return; } if (column == PendingChangesTreeColumn.Size) { DefaultGUI.LabelRightAligned(rect, label, isSelected, isFocused); return; } DefaultGUI.Label(rect, label, isSelected, isFocused); }
static void ChangeTreeViewItemCellGUI( bool isGluonMode, IAssetStatusCache assetStatusCache, Rect rect, float rowHeight, PendingChangesTreeView treeView, UnityPendingChangesTree pendingChangesTree, ChangeTreeViewItem item, PendingChangesTreeColumn column, bool isSelected, bool isFocused) { PendingChangeInfo changeInfo = item.ChangeInfo; string label = changeInfo.GetColumnText( PendingChangesTreeHeaderState.GetColumnName(column)); DefaultStyles.label.fontSize = UnityConstants.PENDING_CHANGES_FONT_SIZE; if (column == PendingChangesTreeColumn.Item) { if (pendingChangesTree.HasMeta(changeInfo.ChangeInfo)) { label = string.Concat(label, UnityConstants.TREEVIEW_META_LABEL); } Texture icon = GetIcon(changeInfo); bool isConflicted = IsConflicted( isGluonMode, assetStatusCache, changeInfo.ChangeInfo.GetFullPath()); GetChangesOverlayIcon.Data overlayIconData = GetChangesOverlayIcon.ForPendingChange( changeInfo.ChangeInfo, isConflicted); bool wasChecked = changeInfo.IsChecked(); bool isChecked = DrawTreeViewItem.ForCheckableItemCell( rect, rowHeight, item.depth, icon, overlayIconData, label, isSelected, isFocused, false, wasChecked); changeInfo.UpdateCheckedState(isChecked); if (wasChecked != isChecked) { UpdateCheckStateForSelection(treeView, item); treeView.SelectionChanged(); } return; } if (column == PendingChangesTreeColumn.Size) { DrawTreeViewItem.ForSecondaryLabelRightAligned( rect, label, isSelected, isFocused, false); return; } DrawTreeViewItem.ForSecondaryLabel( rect, label, isSelected, isFocused, false); }