public int[] BaseIndexes() { string[] mainArray = ISD_FrameworkHandler.BaseFrameworksArray(); List <int> indexes = new List <int>(mainArray.Length); for (int i = 0; i < mainArray.Length; i++) { indexes.Add(i); } return(indexes.ToArray()); }
public static void Library() { SA.Common.Editor.Tools.BlockHeader("LIBRARIES"); EditorGUILayout.BeginHorizontal(); EditorGUI.indentLevel++; ISD_Settings.Instance.IsDefLibrariesOpen = EditorGUILayout.Foldout(ISD_Settings.Instance.IsDefLibrariesOpen, "Default Unity Libraries (2 Enabled)"); EditorGUI.indentLevel--; EditorGUILayout.EndHorizontal(); if (ISD_Settings.Instance.IsDefLibrariesOpen) { EditorGUILayout.BeginVertical(GUI.skin.box); SA.Common.Editor.Tools.SelectableLabel("libiPhone-lib.a", ""); SA.Common.Editor.Tools.SelectableLabel("libiconv.2.dylib", ""); EditorGUILayout.EndVertical(); EditorGUILayout.Space(); } EditorGUILayout.Space(); DrawSeparatorLine(); EditorGUILayout.LabelField("Custom Libraries", EditorStyles.boldLabel); if (ISD_Settings.Instance.Libraries.Count == 0) { EditorGUILayout.HelpBox("No Libraries added", MessageType.None); } EditorGUI.indentLevel++; { foreach (Lib lib in ISD_Settings.Instance.Libraries) { EditorGUILayout.BeginVertical(GUI.skin.box); EditorGUILayout.BeginHorizontal(); lib.IsOpen = EditorGUILayout.Foldout(lib.IsOpen, lib.Name); if (lib.IsOptional) { EditorGUILayout.LabelField("(Optional)"); } bool ItemWasRemoved = SA.Common.Editor.Tools.SrotingButtons((object)lib, ISD_Settings.Instance.Libraries); if (ItemWasRemoved) { return; } EditorGUILayout.EndHorizontal(); if (lib.IsOpen) { lib.IsOptional = SA.Common.Editor.Tools.YesNoFiled("Optional", lib.IsOptional); EditorGUILayout.Space(); } EditorGUILayout.EndVertical(); } } EditorGUI.indentLevel--; //EditorGUILayout.Space(); EditorGUILayout.BeginHorizontal(); EditorStyles.popup.fixedHeight = 20; NewLibraryIndex = EditorGUILayout.Popup(NewLibraryIndex, ISD_LibHandler.BaseLibrariesArray()); if (GUILayout.Button("Add Library", GUILayout.Height(20))) { iOSLibrary type = (iOSLibrary)ISD_LibHandler.enumValueOf(ISD_LibHandler.BaseLibrariesArray()[NewLibraryIndex]); NewLibraryIndex = 0; Debug.Log("Adding new library with type = " + type.ToString()); ISD_Settings.Instance.AddLibrary(type); } EditorGUILayout.EndHorizontal(); DrawSeparatorLine(); List <string> foundedLibraries = ISD_FrameworkHandler.GetImportedLibraries(); if (foundedLibraries.Count > 0) { EditorGUILayout.LabelField("Libraries Inide Current Project", EditorStyles.boldLabel); EditorGUILayout.BeginVertical(GUI.skin.box); foreach (string s in foundedLibraries) { SA.Common.Editor.Tools.SelectableLabel(s, ""); } EditorGUILayout.EndVertical(); } }
public static void Frameworks() { SA.Common.Editor.Tools.BlockHeader("FRAMEWORKS"); EditorGUILayout.BeginHorizontal(); EditorGUI.indentLevel++; ISD_Settings.Instance.IsDefFrameworksOpen = EditorGUILayout.Foldout(ISD_Settings.Instance.IsDefFrameworksOpen, "Default Unity Frameworks (17 Enabled)"); EditorGUI.indentLevel--; EditorGUILayout.EndHorizontal(); if (ISD_Settings.Instance.IsDefFrameworksOpen) { EditorGUILayout.BeginVertical(GUI.skin.box); foreach (Framework framework in ISD_FrameworkHandler.DefaultFrameworks) { SA.Common.Editor.Tools.SelectableLabel(framework.Type.ToString() + ".framework", ""); //AvailableFrameworks; } EditorGUILayout.EndVertical(); EditorGUILayout.Space(); } EditorGUILayout.Space(); GUI.enabled = false; EditorGUILayout.TextArea("", GUI.skin.horizontalSlider); GUI.enabled = GUI_ENABLED; EditorGUILayout.LabelField("Custom IOS Frameworks", EditorStyles.boldLabel); if (ISD_Settings.Instance.Frameworks.Count == 0) { EditorGUILayout.HelpBox("No Frameworks Added", MessageType.None); } else { foreach (Framework framework in ISD_Settings.Instance.Frameworks) { EditorGUILayout.BeginVertical(GUI.skin.box); EditorGUI.indentLevel++; EditorGUILayout.BeginHorizontal(); framework.IsOpen = EditorGUILayout.Foldout(framework.IsOpen, framework.TypeString); if (framework.IsOptional) { EditorGUILayout.LabelField("(Optional)"); } bool ItemWasRemoved = SA.Common.Editor.Tools.SrotingButtons((object)framework, ISD_Settings.Instance.Frameworks); if (ItemWasRemoved) { return; } EditorGUILayout.EndHorizontal(); if (framework.IsOpen) { EditorGUI.indentLevel++; framework.IsOptional = SA.Common.Editor.Tools.YesNoFiled("Optional", framework.IsOptional); EditorGUILayout.Space(); EditorGUI.indentLevel--; } EditorGUI.indentLevel--; EditorGUILayout.EndVertical(); } } EditorGUILayout.BeginHorizontal(); EditorStyles.popup.fixedHeight = 20; NewBaseFrameworkIndex = EditorGUILayout.Popup(NewBaseFrameworkIndex, ISD_FrameworkHandler.BaseFrameworksArray()); if (GUILayout.Button("Add Framework", GUILayout.Height(20))) { var type = ISD_FrameworkHandler.BaseFrameworksArray() [NewBaseFrameworkIndex]; NewBaseFrameworkIndex = 0; Framework f = new Framework(type); ISD_Settings.Instance.Frameworks.Add(f); } //EditorGUILayout.Space(); EditorGUILayout.EndHorizontal(); //EditorGUILayout.Space(); DrawSeparatorLine(); List <string> foundedFrameworks = ISD_FrameworkHandler.GetImportedFrameworks(); if (foundedFrameworks.Count > 0) { EditorGUILayout.LabelField("Frameworks Inide Current Project", EditorStyles.boldLabel); EditorGUILayout.BeginVertical(GUI.skin.box); GUI.enabled = false; foreach (string s in foundedFrameworks) { EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField(s); EditorGUILayout.EndHorizontal(); } GUI.enabled = GUI_ENABLED; EditorGUILayout.EndVertical(); } else { //EditorGUILayout.HelpBox ("Not found any custom \".framework\" in project", MessageType.None); } }
public static void Library() { SA.Common.Editor.Tools.BlockHeader("LIBRARIES"); EditorGUILayout.BeginHorizontal(); EditorGUI.indentLevel++; ISD_Settings.Instance.IsDefLibrariesOpen = EditorGUILayout.Foldout(ISD_Settings.Instance.IsDefFrameworksOpen, "Default Unity Libraries (2 Enabled)"); EditorGUI.indentLevel--; EditorGUILayout.EndHorizontal(); if (ISD_Settings.Instance.IsDefLibrariesOpen) { EditorGUILayout.BeginVertical(GUI.skin.box); SA.Common.Editor.Tools.SelectableLabel("libiPhone-lib.a", ""); SA.Common.Editor.Tools.SelectableLabel("libiconv.2.dylib", ""); EditorGUILayout.EndVertical(); EditorGUILayout.Space(); } SA.Common.Editor.Tools.DrawSeparatorLine(); EditorGUILayout.LabelField("Custom Libraries", EditorStyles.boldLabel); if (ISD_Settings.Instance.Libraries.Count == 0) { EditorGUILayout.HelpBox("No Libraries added", MessageType.None); } EditorGUI.indentLevel++; { foreach (Lib lib in ISD_Settings.Instance.Libraries) { EditorGUILayout.BeginVertical(GUI.skin.box); EditorGUILayout.BeginHorizontal(); lib.IsOpen = EditorGUILayout.Foldout(lib.IsOpen, lib.Name); if (lib.IsOptional) { EditorGUILayout.LabelField("(Optional)"); } bool ItemWasRemoved = SA.Common.Editor.Tools.SrotingButtons((object)lib, ISD_Settings.Instance.Libraries); if (ItemWasRemoved) { return; } EditorGUILayout.EndHorizontal(); if (lib.IsOpen) { lib.Name = SA.Common.Editor.Tools.TextField("Full Name:", lib.Name); lib.IsOptional = SA.Common.Editor.Tools.YesNoFiled("Optional", lib.IsOptional); EditorGUILayout.Space(); } EditorGUILayout.EndVertical(); } } EditorGUI.indentLevel--; EditorGUILayout.Space(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.Space(); if (GUILayout.Button("Add New Library", GUILayout.Width(250))) { Lib lib = new Lib(); lib.Name = "NewLibrary"; ISD_Settings.Instance.Libraries.Add(lib); } EditorGUILayout.Space(); EditorGUILayout.EndHorizontal(); SA.Common.Editor.Tools.DrawSeparatorLine(); List <string> foundedLibraries = ISD_FrameworkHandler.GetImportedLibraries(); if (foundedLibraries.Count > 0) { EditorGUILayout.LabelField("Libraries Inide Current Project", EditorStyles.boldLabel); EditorGUILayout.BeginVertical(GUI.skin.box); //GUI.enabled = false; foreach (string s in foundedLibraries) { SA.Common.Editor.Tools.SelectableLabel(s, ""); } //GUI.enabled = true; EditorGUILayout.EndVertical(); } }
public static void Frameworks() { SA_EditorGUILayout.Header("FRAMEWORKS"); EditorGUILayout.BeginHorizontal(); EditorGUI.indentLevel++; ISD_Settings.Instance.IsDefFrameworksOpen = EditorGUILayout.Foldout(ISD_Settings.Instance.IsDefFrameworksOpen, "Default Unity Frameworks (17 Enabled)"); EditorGUI.indentLevel--; EditorGUILayout.EndHorizontal(); if (ISD_Settings.Instance.IsDefFrameworksOpen) { EditorGUILayout.BeginVertical(GUI.skin.box); foreach (ISD_Framework framework in ISD_FrameworkHandler.DefaultFrameworks) { SA_EditorGUILayout.SelectableLabel(framework.Type.ToString() + ".framework", ""); } EditorGUILayout.EndVertical(); EditorGUILayout.Space(); } EditorGUILayout.Space(); SA_EditorGUILayout.HorizontalLine(); EditorGUILayout.LabelField("Custom IOS Frameworks", EditorStyles.boldLabel); SA_EditorGUILayout.ReorderablList(ISD_Settings.Instance.Frameworks, (ISD_Framework framework) => { if (framework.IsOptional && framework.IsEmbeded) { return(framework.Name + " (Optional & Embeded)"); } else if (framework.IsOptional) { return(framework.Name + " (Optional)"); } else if (framework.IsEmbeded) { return(framework.Name + " (Embeded)"); } else { return(framework.Name); } }, (ISD_Framework framework) => { framework.IsOptional = SA_EditorGUILayout.ToggleFiled("Optional", framework.IsOptional, SA_StyledToggle.ToggleType.YesNo); framework.IsEmbeded = SA_EditorGUILayout.ToggleFiled("Embeded", framework.IsEmbeded, SA_StyledToggle.ToggleType.YesNo); } ); EditorGUILayout.BeginHorizontal(); EditorStyles.popup.fixedHeight = 20; NewBaseFrameworkIndex = EditorGUILayout.Popup(NewBaseFrameworkIndex, ISD_FrameworkHandler.BaseFrameworksArray()); if (GUILayout.Button("Add Framework", GUILayout.Height(20))) { var type = ISD_FrameworkHandler.BaseFrameworksArray() [NewBaseFrameworkIndex]; NewBaseFrameworkIndex = 0; ISD_Framework f = new ISD_Framework(type); ISD_API.AddFramework(f); } EditorGUILayout.EndHorizontal(); SA_EditorGUILayout.HorizontalLine(); DrawEmbededBlock(); }