void DrawCapabilitiesSection() { if (!DrawFoldOut(Sections.Capabilities)) { return; } var capabilities = ChangeFile.Capabilities; EditorGUILayout.BeginHorizontal(); GUILayout.Space(INDENT_SPACE); EditorGUILayout.BeginVertical(); SystemCapability [] platformCapabilities; if (Parent.Platform == BuildPlatform.tvOS) { platformCapabilities = SystemCapabilityHelper.TVOSCapabilities; } else if (Parent.Platform == BuildPlatform.MacOS) { platformCapabilities = SystemCapabilityHelper.MacOSCapabilities; } else { platformCapabilities = SystemCapabilityHelper.IOSCapabilities; } foreach (var capability in platformCapabilities) { bool enabled = capabilities.IsCapabilityEnabled(capability); if (!enabled) { continue; } EditorGUILayout.BeginVertical(Style.Box()); string capabilityName = SystemCapabilityHelper.Name(capability); EditorGUILayout.LabelField(capabilityName, GUILayout.ExpandWidth(true)); EditorGUILayout.BeginHorizontal(); GUILayout.Space(INDENT_SPACE); EditorGUILayout.BeginVertical(); var baseCap = capabilities.Capability(capability); if (baseCap != null) { DrawCapability(capability, baseCap); } EditorGUILayout.EndVertical(); EditorGUILayout.EndHorizontal(); EditorGUILayout.EndVertical(); } EditorGUILayout.EndVertical(); GUILayout.Space(RIGHT_SPACE); EditorGUILayout.EndHorizontal(); }
void DrawStringList(List <string> list) { if (list == null || list.Count <= 0) { return; } EditorGUILayout.BeginHorizontal(); EditorGUILayout.BeginVertical(Style.Box()); for (int ii = 0; ii < list.Count; ++ii) { EditorGUILayout.LabelField(list[ii]); GUILayout.FlexibleSpace(); } EditorGUILayout.EndVertical(); GUILayout.Space(40); EditorGUILayout.EndHorizontal(); }
protected void DrawLeft() { EditorGUILayout.BeginHorizontal(); GUILayout.Space(INDENT_SPACE); EditorGUILayout.BeginVertical(Style.Box(), GUILayout.MinHeight(EditorGUIUtility.singleLineHeight)); }