void DrawStaticLibraryEntry(StaticLibraryEntry entry, float labelWidth, float indentWidth, bool isChild = false) { EditorGUILayout.BeginHorizontal(); GUILayout.Space(indentWidth); var label = new GUIContent(entry.FileName, entry.Path); EditorGUILayout.LabelField(label, GUILayout.Width(labelWidth)); if (FileAndFolderEntryFactory.Exists(entry.Path)) { GUILayout.Space(SQUARE_BUTTON_SPACE_WIDTH); } else { Style.WarningIcon("File is missing"); } if (isChild) { GUILayout.Space(ENUM_POPUP_WIDTH); } else { EditorGUILayout.LabelField(entry.Add.ToString(), GUILayout.Width(ENUM_POPUP_WIDTH)); } EditorGUILayout.LabelField(entry.Link.ToString(), GUILayout.Width(ENUM_POPUP_WIDTH)); EditorGUILayout.EndHorizontal(); GUILayout.Space(2); }
void DrawFrameworkEntry(FrameworkEntry entry, float labelWidth, float indentWidth, bool isChild = false) { EditorGUILayout.BeginHorizontal(); GUILayout.Space(indentWidth); var label = new GUIContent(entry.FileName, entry.Path); EditorGUILayout.LabelField(label, GUILayout.Width(labelWidth)); if (FileAndFolderEntryFactory.Exists(entry.Path)) { GUILayout.Space(SQUARE_BUTTON_SPACE_WIDTH); } else { Style.WarningIcon("File is missing"); } if (isChild) { GUILayout.Space(ENUM_POPUP_WIDTH); } else { var add = entry.Embedded ? AddMethod.Copy : entry.Add; EditorGUILayout.LabelField(add.ToString(), GUILayout.Width(ENUM_POPUP_WIDTH)); } var link = entry.Embedded ? LinkType.Required : entry.Link; EditorGUILayout.LabelField(link.ToString(), GUILayout.Width(ENUM_POPUP_WIDTH)); if (entry.Embedded) { EditorGUILayout.LabelField("Embedded", GUILayout.Width(ENUM_POPUP_WIDTH)); } EditorGUILayout.EndHorizontal(); GUILayout.Space(2); }
void DrawFolderEntry(FolderEntry entry, int level, bool isChild = false) { EditorGUILayout.BeginHorizontal(); float indent = level * FOLDER_INDENT; GUILayout.Space(indent); float labelWidth = MaxFolderSectionWidth - indent; Style.FixedWidthLabel(entry.FileName, entry.Path, labelWidth); if (FileAndFolderEntryFactory.Exists(entry.Path)) { GUILayout.Space(SQUARE_BUTTON_SPACE_WIDTH); } else { Style.WarningIcon("Folder is missing"); } if (isChild) { GUILayout.Space(ENUM_POPUP_WIDTH); } else { EditorGUILayout.LabelField(entry.Add.ToString(), GUILayout.Width(ENUM_POPUP_WIDTH)); } EditorGUILayout.Space(); EditorGUILayout.EndHorizontal(); int nextLevel = level + 1; float nextIndentWidth = nextLevel * FOLDER_INDENT; float nextLabelWidth = MaxFolderSectionWidth - nextIndentWidth; DrawFileEntries(entry.Entries, nextLevel, nextLabelWidth, nextIndentWidth); }