static public void Init()
        {
            init = true;
            window = (EditorPlusShortcuts)EditorWindow.GetWindow(typeof(EditorPlusShortcuts));
            window.title = "Shortcuts";
            window.minSize = new Vector2(StartMargin.x + ButtonSize.x + ButtonMargin.x, StartMargin.y + ButtonSize.y + ButtonMargin.y);

            widgetHost = new WidgetHost(window.position, StartMargin, ButtonMargin, ButtonSize, 0, 1f, true);

            ShortcutsSkinEdit = AssetDatabase.LoadMainAssetAtPath(EditorPlus.PlusPath + "UnityPlusSkinShortcutsEdit.guiskin") as GUISkin;

            if (Shortcuts == null)
                Shortcuts = new List<string>();

            if (ShortcutsDefaults == null)
                ShortcutsDefaults = new List<string>();

            if (ShortcutsCustoms == null)
                ShortcutsCustoms = new List<string>();

            SaveDefaults();

#if EPlus_5
            SaveDefaultsUI();
#endif

            LoadAllSaves();
            LoadResources();

            EditorPlus.OnSkinSwitched += LoadResources;
        }
        static public void Init()
        {
            init = true;
            window = (EditorPlusHistory)EditorWindow.GetWindow(typeof(EditorPlusHistory));
            window.title = "History & Favs";
            window.minSize = new Vector2(window.minSize.x, 57);


            Load();

            float sc = EditorPrefs.GetFloat("EditorPlusHistory.Scale", 1f);
            showLabels = EditorPrefs.GetBool("EditorPlusHistory.ShowLabels", true);
            historySize = EditorPrefs.GetInt("EditorPlusHistory.HistorySize", 25);

            //EditorPlusHistoryInternal.ForceDataUpdate();

            widgetHostFavs = new WidgetHost(window.position, StartMarginFavs, ButtonMargin + new Vector2(LockClosed.width, 0), ButtonSize, EditorPlusHistoryInternal.favorites.Count, sc, true);
            widgetHostHistory = new WidgetHost(window.position, StartMarginHist, ButtonMargin + new Vector2(LockClosed.width, 0), ButtonSize, EditorPlusHistoryInternal.favorites.Count, sc, true);

            EditorPlus.OnSkinSwitched += Load;
        }
        static public void Init()
        {
            init           = true;
            window         = (EditorPlusHistory)EditorWindow.GetWindow(typeof(EditorPlusHistory));
            window.title   = "History & Favs";
            window.minSize = new Vector2(window.minSize.x, 57);


            Load();

            float sc = EditorPrefs.GetFloat("EditorPlusHistory.Scale", 1f);

            showLabels  = EditorPrefs.GetBool("EditorPlusHistory.ShowLabels", true);
            historySize = EditorPrefs.GetInt("EditorPlusHistory.HistorySize", 25);

            //EditorPlusHistoryInternal.ForceDataUpdate();

            widgetHostFavs    = new WidgetHost(window.position, StartMarginFavs, ButtonMargin + new Vector2(LockClosed.width, 0), ButtonSize, EditorPlusHistoryInternal.favorites.Count, sc, true);
            widgetHostHistory = new WidgetHost(window.position, StartMarginHist, ButtonMargin + new Vector2(LockClosed.width, 0), ButtonSize, EditorPlusHistoryInternal.favorites.Count, sc, true);

            EditorPlus.OnSkinSwitched += Load;
        }
Beispiel #4
0
        static public void Init()
        {
            init           = true;
            window         = (EditorPlusShortcuts)EditorWindow.GetWindow(typeof(EditorPlusShortcuts));
            window.title   = "Shortcuts";
            window.minSize = new Vector2(StartMargin.x + ButtonSize.x + ButtonMargin.x, StartMargin.y + ButtonSize.y + ButtonMargin.y);

            widgetHost = new WidgetHost(window.position, StartMargin, ButtonMargin, ButtonSize, 0, 1f, true);

            ShortcutsSkinEdit = AssetDatabase.LoadMainAssetAtPath(EditorPlus.PlusPath + "UnityPlusSkinShortcutsEdit.guiskin") as GUISkin;

            if (Shortcuts == null)
            {
                Shortcuts = new List <string>();
            }

            if (ShortcutsDefaults == null)
            {
                ShortcutsDefaults = new List <string>();
            }

            if (ShortcutsCustoms == null)
            {
                ShortcutsCustoms = new List <string>();
            }

            SaveDefaults();

#if EPlus_5
            SaveDefaultsUI();
#endif

            LoadAllSaves();
            LoadResources();

            EditorPlus.OnSkinSwitched += LoadResources;
        }
Beispiel #5
0
        void OnEnable()
        {
            if (widgetHost == null)
            {
                widgetHost = new WidgetHost(position, StartMargin, ButtonMargin, ButtonSize, 0, 1f, false);
            }

            if (skin == null)
            {
                skin = AssetDatabase.LoadMainAssetAtPath(EditorPlus.PlusPath + "HotbarSkin.guiskin") as GUISkin;
            }

            if (savedHotbars == null)
            {
                savedHotbars = new List <string>();
                string bars = EditorPrefs.GetString("EditorPlus.Hotbar.Barnames", "");
                if (bars != "")
                {
                    savedHotbars.AddRange(bars.Split(','));
                }
            }

            init = true;
        }
        void OnEnable()
        {
            if(widgetHost == null)
                widgetHost = new WidgetHost(position, StartMargin, ButtonMargin, ButtonSize, 0, 1f, false);

            if (skin == null)
                skin = AssetDatabase.LoadMainAssetAtPath(EditorPlus.PlusPath +"HotbarSkin.guiskin") as GUISkin;

            if (savedHotbars == null)
            {
                savedHotbars = new List<string>();
                string bars = EditorPrefs.GetString("EditorPlus.Hotbar.Barnames", "");
                if(bars != "")
                {
                    savedHotbars.AddRange(bars.Split(','));
                }
            }

            init = true;
        }