private static void DrawComponent(ComponentResolutionData componentData) { var color = GUI.color; GUI.color = Color.white; GUILayout.BeginHorizontal(); if (componentData.Dependencies.Length > 0) { const int indentPerLevel = 20; GUILayout.Space(componentData.Depth * indentPerLevel); GUILayout.Label("-", GUILayout.Width(10)); DrawReadonlyField(componentData.Component); GUILayout.FlexibleSpace(); } if (componentData.Injectable) { if (componentData.Dependencies.Length > 0) { DrawDependencies(componentData); } } else { DrawDependencyBox("Not injectable"); } GUILayout.EndHorizontal(); GUI.color = color; }
private static void DrawDependencies(ComponentResolutionData componentData) { foreach (var(dependency, source) in componentData.Dependencies) { var dependencyText = dependency.GetFriendlyName(); DrawDependencyBox(dependencyText, source); } }
private static void DrawDependencies(ComponentResolutionData componentData) { foreach (var(dependency, canBeResolved) in componentData.Dependencies) { var dependencyText = dependency.Name; DrawBox(dependencyText, canBeResolved); } }