public void DrawBlueprintRowItem(GenericWorldItem item, int itemIndex, int rowIndex) { if (selectedItemIndex == itemIndex && rowIndex == selectedRowIndex && openWindow) { UnityEngine.GUI.color = Color.yellow; DrawGenericWorldItemSelector(item, ref openWindow, true); } else { UnityEngine.GUI.color = Color.white; if (item == null || item.IsEmpty) { UnityEngine.GUI.color = Color.Lerp(Color.grey, Color.black, 0.5f); if (GUILayout.Button("\n\n\n =(Empty)= \n\n\n", UnityEditor.EditorStyles.miniButton)) { selectedRowIndex = rowIndex; selectedItemIndex = itemIndex; openWindow = true; } } else { UnityEngine.GUI.color = Color.Lerp(Color.green, Colors.ColorFromString(item.PrefabName, 150), 0.85f); string buttonName = item.PrefabName; int numReturns = 4; if (!string.IsNullOrEmpty(item.StackName)) { buttonName += "\n(" + item.StackName + ")"; numReturns--; } if (!string.IsNullOrEmpty(item.State) && item.State != "Default") { buttonName += "\n(" + item.State + ")"; numReturns--; } if (!string.IsNullOrEmpty(item.Subcategory)) { buttonName += "\n(" + item.Subcategory + ")"; numReturns--; } string returns = string.Empty; for (int i = 0; i < numReturns; i++) { returns += "\n"; } if (GUILayout.Button(returns + buttonName + returns, UnityEditor.EditorStyles.miniButton)) { selectedRowIndex = rowIndex; selectedItemIndex = itemIndex; openWindow = true; } } } }