예제 #1
0
        private static void CreateSettingsAssets(bool saveAssets = true)
        {
            DoozyUtils.ClearProgressBar();
            DoozyUtils.DisplayProgressBar("Hold on...", "Check Asset - DoozyWindowSettings", 0.1f);
            DoozyWindowSettings.Instance.SetDirty(false);
            DoozyUtils.DisplayProgressBar("Hold on...", "Check Asset - NodyWindowSettings", 0.2f);
            NodyWindowSettings.Instance.SetDirty(false);
            DoozyUtils.DisplayProgressBar("Hold on...", "Check Asset - SoundySettings", 0.3f);
            SoundySettings.Instance.SetDirty(false);
            DoozyUtils.DisplayProgressBar("Hold on...", "Check Asset - ThemesSettings", 0.35f);
            ThemesSettings.Instance.SetDirty(false);
            DoozyUtils.DisplayProgressBar("Hold on...", "Check Asset - TouchySettings", 0.4f);
            TouchySettings.Instance.SetDirty(false);

            DoozyUtils.DisplayProgressBar("Hold on...", "Check Asset - UIButtonSettings", 0.5f);
            UIButtonSettings.Instance.SetDirty(false);
            DoozyUtils.DisplayProgressBar("Hold on...", "Check Asset - UICanvasSettings", 0.6f);
            UICanvasSettings.Instance.SetDirty(false);
            DoozyUtils.DisplayProgressBar("Hold on...", "Check Asset - UIDrawerSettings", 0.7f);
            UIDrawerSettings.Instance.SetDirty(false);
            DoozyUtils.DisplayProgressBar("Hold on...", "Check Asset - UIPopupSettings", 0.8f);
            UIPopupSettings.Instance.SetDirty(false);
            DoozyUtils.DisplayProgressBar("Hold on...", "Check Asset - UIToggleSettings", 0.85f);
            UIToggleSettings.Instance.SetDirty(false);
            DoozyUtils.DisplayProgressBar("Hold on...", "Check Asset - UIViewSettings", 0.9f);
            UIViewSettings.Instance.SetDirty(false);

            if (saveAssets)
            {
                DoozyUtils.DisplayProgressBar("Hold on...", "Saving Assets...", 0.95f);
                DoozyUtils.SaveAssets();
            }

            DoozyUtils.ClearProgressBar();
        }
예제 #2
0
        private static void CreateSettingsAssets()
        {
            DoozyUtils.ClearProgressBar();
            DoozyUtils.DisplayProgressBar("Hold On", "Creating Settings Assets...", 0.1f);
            DoozyWindowSettings.Instance.SetDirty(false);
            DoozyUtils.DisplayProgressBar("Hold On", "Creating Settings Assets...", 0.2f);
            NodyWindowSettings.Instance.SetDirty(false);
            DoozyUtils.DisplayProgressBar("Hold On", "Creating Settings Assets...", 0.3f);
            SoundySettings.Instance.SetDirty(false);
            DoozyUtils.DisplayProgressBar("Hold On", "Creating Settings Assets...", 0.4f);
            TouchySettings.Instance.SetDirty(false);

            DoozyUtils.DisplayProgressBar("Hold On", "Creating Settings Assets...", 0.5f);
            UIButtonSettings.Instance.SetDirty(false);
            DoozyUtils.DisplayProgressBar("Hold On", "Creating Settings Assets...", 0.6f);
            UICanvasSettings.Instance.SetDirty(false);
            DoozyUtils.DisplayProgressBar("Hold On", "Creating Settings Assets...", 0.7f);
            UIDrawerSettings.Instance.SetDirty(false);
            DoozyUtils.DisplayProgressBar("Hold On", "Creating Settings Assets...", 0.8f);
            UIPopupSettings.Instance.SetDirty(false);
            DoozyUtils.DisplayProgressBar("Hold On", "Creating Settings Assets...", 0.85f);
            UIToggleSettings.Instance.SetDirty(false);
            DoozyUtils.DisplayProgressBar("Hold On", "Creating Settings Assets...", 0.9f);
            UIViewSettings.Instance.SetDirty(false);

            DoozyUtils.DisplayProgressBar("Hold On", "Saving Settings Assets...", 0.95f);
            DoozyUtils.SaveAssets();
            DoozyUtils.ClearProgressBar();
        }
예제 #3
0
        private static void RegenerateDatabaseAssets()
        {
            DoozyUtils.ClearProgressBar();

            //SOUNDY
            DoozyUtils.DisplayProgressBar("Hold On", "Regenerating Databases...", 0.1f);
            SoundySettings.Database.SearchForUnregisteredDatabases(false);
            DoozyUtils.DisplayProgressBar("Hold On", "Regenerating Databases...", 0.2f);
            SoundySettings.Database.RefreshDatabase(false, true);

            //UIAnimations
            DoozyUtils.DisplayProgressBar("Hold On", "Regenerating Databases...", 0.3f);
            UIAnimations.Instance.SearchForUnregisteredDatabases(false);

            DoozyUtils.DisplayProgressBar("Hold On", "Regenerating Databases...", 0.4f);
            UIButtonSettings.Database.SearchForUnregisteredDatabases(false);
            DoozyUtils.DisplayProgressBar("Hold On", "Regenerating Databases...", 0.6f);
            UICanvasSettings.Database.SearchForUnregisteredDatabases(false);
            DoozyUtils.DisplayProgressBar("Hold On", "Regenerating Databases...", 0.7f);
            UIDrawerSettings.Database.SearchForUnregisteredDatabases(false);
            DoozyUtils.DisplayProgressBar("Hold On", "Regenerating Databases...", 0.8f);
            UIPopupSettings.Database.SearchForUnregisteredLinks(false);
            DoozyUtils.DisplayProgressBar("Hold On", "Regenerating Databases...", 0.9f);
            UIViewSettings.Database.SearchForUnregisteredDatabases(false);

            DoozyUtils.DisplayProgressBar("Hold On", "Saving Database Assets...", 0.95f);
            DoozyUtils.SaveAssets();
            DoozyUtils.ClearProgressBar();
        }
예제 #4
0
        public static void Run()
        {
            if (EditorApplication.isCompiling || EditorApplication.isUpdating)
            {
                DelayedCall.Run(2f, Run);
                return;
            }

            DoozyPath.CreateMissingFolders();

            CreateSettingsAssets(false);
            CreateDatabaseAssets(false);
            RegenerateDatabaseAssets(false);

            ProcessorsSettings.Instance.RunDoozyAssetsProcessor = false;
            ProcessorsSettings.Instance.SetDirty(false);

            DoozyUtils.DisplayProgressBar("Hold on...", "Saving Processor Settings...", 0.95f);
            DoozyUtils.SaveAssets();
            DoozyUtils.ClearProgressBar();

#if !dUI_MASTER
            if (AssetDatabase.IsValidFolder("Assets/DoozyInstaller"))
            {
                AssetDatabase.MoveAssetToTrash("Assets/DoozyInstaller");
            }
#endif
        }
예제 #5
0
        private static void CreateDatabaseAssets(bool saveAssets = true)
        {
            DoozyUtils.ClearProgressBar();
            DoozyUtils.DisplayProgressBar("Hold on...", "Check Asset - UIAnimations", 0.1f);
            UIAnimations.Instance.SetDirty(false);
            DoozyUtils.DisplayProgressBar("Hold on...", "Check Asset - SoundySettings", 0.15f);
            SoundySettings.Database.SetDirty(false);
            DoozyUtils.DisplayProgressBar("Hold on...", "Check Asset - ThemesSettings", 0.2f);
            ThemesSettings.Database.SetDirty(false);
            DoozyUtils.DisplayProgressBar("Hold on...", "Check Asset - UIButtonSettings", 0.3f);
            UIButtonSettings.Database.SetDirty(false);
            DoozyUtils.DisplayProgressBar("Hold on...", "Check Asset - UICanvasSettings", 0.5f);
            UICanvasSettings.Database.SetDirty(false);
            DoozyUtils.DisplayProgressBar("Hold on...", "Check Asset - UIDrawerSettings", 0.7f);
            UIDrawerSettings.Database.SetDirty(false);
            DoozyUtils.DisplayProgressBar("Hold on...", "Check Asset - UIPopupSettings", 0.8f);
            UIPopupSettings.Database.SetDirty(false);
            DoozyUtils.DisplayProgressBar("Hold on...", "Check Asset - UIViewSettings", 0.9f);
            UIViewSettings.Database.SetDirty(false);

            if (saveAssets)
            {
                DoozyUtils.DisplayProgressBar("Hold on...", "Saving Assets...", 0.95f);
                DoozyUtils.SaveAssets();
            }

            DoozyUtils.ClearProgressBar();
        }
        private static void RegenerateDatabaseAssets(bool saveAssets = true)
        {
            DoozyUtils.ClearProgressBar();

            //SOUNDY
            DoozyUtils.DisplayProgressBar("Hold on...", "Soundy - Search For Unregistered Databases", 0.1f);
            SoundySettings.Database.SearchForUnregisteredDatabases(false);
            DoozyUtils.DisplayProgressBar("Hold on...", "Soundy - Refresh", 0.2f);
            SoundySettings.Database.RefreshDatabase(false, false);

            //UIAnimations
            DoozyUtils.DisplayProgressBar("Hold on...", "UIAnimations - Search For Unregistered Databases", 0.3f);
            UIAnimations.Instance.SearchForUnregisteredDatabases(false);

            DoozyUtils.DisplayProgressBar("Hold on...", "Buttons - Search For Unregistered Databases", 0.4f);
            UIButtonSettings.Database.SearchForUnregisteredDatabases(false);
            DoozyUtils.DisplayProgressBar("Hold on...", "Canvases - Search For Unregistered Databases", 0.6f);
            UICanvasSettings.Database.SearchForUnregisteredDatabases(false);
            DoozyUtils.DisplayProgressBar("Hold on...", "Drawers - Search For Unregistered Databases", 0.7f);
            UIDrawerSettings.Database.SearchForUnregisteredDatabases(false);
            DoozyUtils.DisplayProgressBar("Hold on...", "Popups - Search For Unregistered Databases", 0.8f);
            UIPopupSettings.Database.SearchForUnregisteredLinks(false);
            DoozyUtils.DisplayProgressBar("Hold on...", "Views - Search For Unregistered Databases", 0.9f);
            UIViewSettings.Database.SearchForUnregisteredDatabases(false);

            if (saveAssets)
            {
                DoozyUtils.DisplayProgressBar("Hold on...", "Saving Assets...", 0.95f);
                DoozyUtils.SaveAssets();
            }

            DoozyUtils.ClearProgressBar();
        }
예제 #7
0
        public static void Run()
        {
            CreateSettingsAssets();
            CreateDatabaseAssets();
            RegenerateDatabaseAssets();

            ProcessorsSettings.Instance.RunDoozyAssetsProcessor = false;
            ProcessorsSettings.Instance.SetDirty(false);

            DoozyUtils.DisplayProgressBar("Hold On", "Saving Processor Settings...", 0.95f);
            DoozyUtils.SaveAssets();
            DoozyUtils.ClearProgressBar();
        }
        /// <summary> Iterates through all the referenced UIAnimationDatabase databases and populates them with any UIAnimationData </summary>
        private void AddUnreferencedPresets()
        {
#if UNITY_EDITOR
            bool saveAssets = false;
            if (Databases == null)
            {
                Databases = new List <UIAnimationDatabase>();
            }
            foreach (UIAnimationDatabase database in Databases)
            {
                Object[] objects = AssetDatabase.LoadAllAssetsAtPath(AssetDatabase.GetAssetPath(database)); //load all sub assets
                if (objects == null)
                {
                    return;                                                                                 //make sure they are not null
                }
                List <UIAnimationData> foundData = objects.OfType <UIAnimationData>().ToList();             //create a list of all the found sub assets
                bool databaseUpdated             = false;                                                   //mark true if any changes were performed on the database
                foreach (UIAnimationData data in foundData)
                {
                    if (database.Contains(data))
                    {
                        continue;
                    }
                    database.Database.Add(data);
                    databaseUpdated = true;
                }

                if (!databaseUpdated)
                {
                    continue;
                }
                database.SetDirty(false);
                saveAssets = true;
            }

            if (saveAssets)
            {
                UpdateDatabaseNames();
                DoozyUtils.SaveAssets();
            }
#endif
        }
예제 #9
0
        private static void CreateDatabaseAssets()
        {
            DoozyUtils.ClearProgressBar();
            DoozyUtils.DisplayProgressBar("Hold On", "Creating Database Assets...", 0.1f);
            UIAnimations.Instance.SetDirty(false);
            DoozyUtils.DisplayProgressBar("Hold On", "Creating Database Assets...", 0.2f);
            SoundySettings.Database.SetDirty(false);
            DoozyUtils.DisplayProgressBar("Hold On", "Creating Database Assets...", 0.3f);
            UIButtonSettings.Database.SetDirty(false);
            DoozyUtils.DisplayProgressBar("Hold On", "Creating Database Assets...", 0.5f);
            UICanvasSettings.Database.SetDirty(false);
            DoozyUtils.DisplayProgressBar("Hold On", "Creating Database Assets...", 0.7f);
            UIDrawerSettings.Database.SetDirty(false);
            DoozyUtils.DisplayProgressBar("Hold On", "Creating Database Assets...", 0.8f);
            UIPopupSettings.Database.SetDirty(false);
            DoozyUtils.DisplayProgressBar("Hold On", "Creating Database Assets...", 0.9f);
            UIViewSettings.Database.SetDirty(false);

            DoozyUtils.DisplayProgressBar("Hold On", "Saving Database Assets...", 0.95f);
            DoozyUtils.SaveAssets();
            DoozyUtils.ClearProgressBar();
        }
예제 #10
0
        private void DrawViewThemesTopMenu()
        {
            BeginDrawViewTopMenuArea();
            {
                GUILayout.Space((m_viewTopMenuHeight - BarHeight) / 2 - m_viewTopMenuHeight * (1 - CurrentViewExpanded.faded));

                GUILayout.BeginHorizontal();
                {
                    DrawDefaultViewHorizontalSpacing();
                    {
                        GUILayout.Space((m_viewTopMenuHeight - BarHeight) / 3);

                        //New Database
                        GUI.enabled = !NewDatabase.target && !EditMode.target;
                        {
                            if (ButtonNew(NewDatabase.target, UILabels.NewTheme))
                            {
                                NewDatabase.target = !NewDatabase.target;
                                if (NewDatabase.target)
                                {
                                    DoozyUtils.SaveAssets();
                                    m_newDatabaseName = string.Empty;
                                }
                            }
                        }
                        GUI.enabled = true;

                        DrawDefaultViewHorizontalSpacing();

                        if (NewDatabase.target)
                        {
                            GUILayout.Space(DGUI.Properties.Space());
                            GUILayout.BeginVertical();
                            {
                                GUILayout.Space(DGUI.Properties.Space(2));

                                GUILayout.BeginHorizontal(GUILayout.Height(DGUI.Properties.SingleLineHeight + DGUI.Properties.Space(2)));
                                {
                                    GUI.color = DGUI.Colors.GetDColor(ColorName.Green).Normal.WithAlpha(GUI.color.a);
                                    DGUI.Properties.SetNextControlName("m_newDatabaseName");
                                    m_newDatabaseName = EditorGUILayout.TextField(GUIContent.none, m_newDatabaseName, GUILayout.Width(NewCategoryNameTextFieldWidth));
                                    DGUI.Properties.FocusTextInControl("m_newDatabaseName");
                                    GUI.color = InitialGUIColor;

                                    if (DGUI.KeyMapper.DetectKeyUp(Event.current, KeyCode.Return) ||
                                        DGUI.KeyMapper.DetectKeyUp(Event.current, KeyCode.KeypadEnter) ||
                                        DGUI.Button.IconButton.Ok()) //OK - New Database
                                    {
                                        DGUI.Properties.ResetKeyboardFocus();
                                        NewDatabase.target = false;
                                        if (ThemesDatabase.CreateTheme(m_newDatabaseName, true, true))
                                        {
                                            CurrentThemeId = ThemesDatabase.GetThemeData(m_newDatabaseName).Id;
                                            ThemesDatabase.Sort(false);
                                            ThemesDatabase.UpdateThemesNames(true);
                                        }
                                    }

                                    if (DGUI.Button.IconButton.Cancel()) //CANCEL - New Database
                                    {
                                        DGUI.Properties.ResetKeyboardFocus();
                                        NewDatabase.target = false;
                                    }

                                    GUILayout.FlexibleSpace();
                                }
                                GUILayout.EndHorizontal();
                            }
                            GUILayout.EndVertical();
                        }
                        else
                        {
                            bool enabled = GUI.enabled;
                            GUI.enabled = !EditMode.target;
                            {
                                if (ButtonSortDatabase())
                                {
                                    ThemesDatabase.Sort(true, true);                       //Sort Database
                                }
                                DrawDefaultViewHorizontalSpacing();
                                if (ButtonRefreshDatabase())
                                {
                                    ThemesDatabase.RefreshDatabase(false, true);                          //Refresh Database
                                }
                                DrawDefaultViewHorizontalSpacing();
                                if (ButtonSaveDatabase())
                                {
                                    ThemesDatabase.SetDirty(true);                       //Save Database
                                }
                                DrawDefaultViewHorizontalSpacing();
                                if (ButtonSearchFor(UILabels.SearchForThemes))
                                {
                                    ThemesDatabase.SearchForUnregisteredThemes(true);                                            //Search for themes
                                }
                                GUILayout.FlexibleSpace();
                                DrawDefaultViewHorizontalSpacing();
                                if (ButtonAutoSave(ThemesSettings.Instance.AutoSave))
                                {
                                    if (DoozyUtils.DisplayDialog(UILabels.AutoSave,
                                                                 (!ThemesSettings.Instance.AutoSave
                                                                      ? UILabels.ThemesEnableAutoSave
                                                                      : UILabels.ThemesDisableAutoSave),
                                                                 UILabels.Ok,
                                                                 UILabels.Cancel))
                                    {
                                        ThemesSettings.Instance.UndoRecord(UILabels.SetValue);
                                        ThemesSettings.Instance.AutoSave = !ThemesSettings.Instance.AutoSave;
                                        ThemesSettings.Instance.SetDirty(true);
                                        DoozyUtils.DisplayDialog(ThemesSettings.Instance.AutoSave
                                                                     ? UILabels.AutoSaveEnabled
                                                                     : UILabels.AutoSaveDisabled,
                                                                 ThemesSettings.Instance.AutoSave
                                                                     ? UILabels.ThemesAutoSaveEnabled
                                                                     : UILabels.ThemesAutoSaveDisabled,
                                                                 UILabels.Ok);
                                    }
                                }

                                DrawDefaultViewHorizontalSpacing();
                                if (ButtonResetDatabase())
                                {
                                    ThemesDatabase.ResetDatabase();                        //Reset Database
                                }
                            }
                            GUI.enabled = enabled;
                            DrawDefaultViewHorizontalSpacing();
                            if (ButtonEditMode(EditMode.target))
                            {
                                EditMode.target = !EditMode.target;                                  //Edit Mode
                            }
                        }
                    }

                    GUILayout.Space((m_viewTopMenuHeight - BarHeight) / 3);
                }
                GUILayout.EndHorizontal();
            }
            EndDrawViewTopMenuArea();
        }