Esempio n. 1
0
        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());
        }
Esempio n. 2
0
        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);
            }
        }
Esempio n. 3
0
        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();
        }