コード例 #1
0
        private void OnEnable()
        {
            if (prefs == null)
            {
                prefs = BetterPrefs.GetEditorInstance();
            }

            if (foldouts == null)
            {
                foldouts = new Foldouts();
            }

            var component = target as Component;

            gameObject = component == null ? null : component.gameObject;

            targetType = target.GetType();

            id = RuntimeHelper.GetTargetID(target);

            Initialize();

            var rabbit = gui as RabbitGUI;

            if (rabbit != null && _membersDrawnByUnityLayout.Length > 0)
            {
                rabbit.OnFinishedLayoutReserve = DoUnityLayout;
            }

            gui.OnEnable();
        }
コード例 #2
0
 public BaseDrawer()
 {
     if (prefs == null)
         prefs = BetterPrefs.GetEditorInstance();
     if (foldouts == null)
         foldouts = new Foldouts();
 }
コード例 #3
0
        private void OnEnable()
        {
            if (prefs == null)
            {
                prefs = BetterPrefs.GetEditorInstance();
            }

            if (foldouts == null)
            {
                foldouts = new Foldouts(prefs);
            }

            var component = target as Component;

            gameObject = component == null ? null : component.gameObject;

            targetType = target.GetType();

            id = RuntimeHelper.GetTargetID(target);

            _useUnityGUI = useUnityGUI;
            gui          = _useUnityGUI ? (BaseGUI) new TurtleGUI() : new RabbitGUI();

            Initialize();

            gui.OnEnable();
        }
コード例 #4
0
 public MemberCategory(string fullPath, List <ICanBeDrawn> members, float displayOrder, string id, BetterPrefs prefs)
 {
     Members       = members;
     DisplayOrder  = displayOrder;
     this.prefs    = prefs;
     this.fullPath = fullPath;
     this.name     = FullPath.Substring(FullPath.LastIndexOf('/') + 1);
     this.id       = id + fullPath;
     Indent        = true;
 }
コード例 #5
0
ファイル: BaseDrawer.cs プロジェクト: Khaled-Almoukhtar/VFW
 public BaseDrawer()
 {
     if (prefs == null)
     {
         prefs = BetterPrefs.GetEditorInstance();
     }
     if (foldouts == null)
     {
         foldouts = new Foldouts(prefs);
     }
 }
コード例 #6
0
        public RabbitGUI()
        {
            _currentPhase = GUIPhase.Layout;
            _controls     = new List <GUIControl>();
            _blocks       = new List <GUIBlock>();
            _blockStack   = new Stack <GUIBlock>();
            _prefs        = BetterPrefs.GetEditorInstance();

            #if dbg_level_1
            Debug.Log("Instantiated Rabbit");
            #endif
        }
コード例 #7
0
ファイル: MembersCategory.cs プロジェクト: kimsama/VFW-1
        public MembersCategory(string fullPath, List <MemberInfo> members, float displayOrder, int id, BetterPrefs prefs)
        {
            Members       = members;
            DisplayOrder  = displayOrder;
            this.prefs    = prefs;
            this.FullPath = fullPath;
            this.Name     = FullPath.Substring(FullPath.LastIndexOf('/') + 1);
            this.id       = id + fullPath.GetHashCode();
            Indent        = true;

            NestedCategories = new List <MembersCategory>();
        }
コード例 #8
0
        public TextFilter(string[] values, int id, bool initialToggle, Action <string> setValue)
        {
            _values   = values;
            _setValue = setValue;
            _id       = RuntimeHelper.CombineHashCodes(id, "Filter");

            if (_prefs == null)
            {
                _prefs = BetterPrefs.GetEditorInstance();
            }

            _toggle  = _prefs.Bools.ValueOrDefault(this._id, initialToggle);
            _pattern = _prefs.Strings.ValueOrDefault(this._id, "");
        }
コード例 #9
0
ファイル: Foldouts.cs プロジェクト: wugols2004/DanmakU
 public bool this[int key]
 {
     get
     {
         var prefs = BetterPrefs.GetEditorInstance();
         return(prefs.Bools.ValueOrDefault(key));
     }
     set
     {
         var prefs = BetterPrefs.GetEditorInstance();
         prefs.Bools[key] = value;
         EditorUtility.SetDirty(prefs);
     }
 }
コード例 #10
0
 public static void UseRabbitGUI()
 {
     BetterPrefs.GetEditorInstance().Bools[guiKey] = false;
 }
コード例 #11
0
 public static void UseUnityGUI()
 {
     BetterPrefs.GetEditorInstance().Bools[guiKey] = true;
 }
コード例 #12
0
ファイル: BaseEditor.cs プロジェクト: vvhh2002/VFW
        private void OnEnable()
        {
            if (prefs == null)
                prefs = BetterPrefs.GetEditorInstance();

            if (foldouts == null)
                foldouts = new Foldouts(prefs);

            var component = target as Component;
            gameObject = component == null ? null : component.gameObject;

            targetType = target.GetType();

            id = RuntimeHelper.GetTargetID(target);

            Initialize();

            var rabbit = gui as RabbitGUI;
            if (rabbit != null && _membersDrawnByUnityLayout.Length > 0)
                rabbit.OnFinishedLayoutReserve = DoUnityLayout;

            gui.OnEnable();
        }
コード例 #13
0
        protected override void Copy()
        {
            int key = RuntimeHelper.CombineHashCodes(id, "Clip");

            BetterPrefs.GetEditorInstance().Vector3s[key] = memberValue;
        }
コード例 #14
0
        protected override Vector3 Paste()
        {
            int key = RuntimeHelper.CombineHashCodes(id, "Clip");

            return(BetterPrefs.GetEditorInstance().Vector3s[key, memberValue]);
        }
コード例 #15
0
 public Foldouts(BetterPrefs prefs)
 {
     this.prefs = prefs;
 }
コード例 #16
0
ファイル: Foldouts.cs プロジェクト: vvhh2002/VFW
 public Foldouts(BetterPrefs prefs)
 {
     this.prefs = prefs;
 }