public static void DrawGUI(FoCsControlPanel owner)
        {
            using (Disposables.VerticalScope(FoCsGUI.Styles.Unity.Box, GUILayout.ExpandHeight(true), GUILayout.ExpandWidth(true))) {
                FoCsGUI.Layout.Label("List Limiter", FoCsGUI.Styles.Unity.BoldLabel);
                FoCsGUI.Layout.InfoBox("Careful, Disabling this may cause lag in larger lists. This is also the case when its active, but it is reduced. This is caused by the way the Unity Editor is drawn.");

                UnityReorderableListProperty.LimitingEnabled =
                    FoCsGUI.Layout.Toggle(UnityReorderableListProperty.LimitingEnabled? Enabled : Disabled, UnityReorderableListProperty.LimitingEnabled);

                using (var cc = Disposables.ChangeCheck()) {
                    FoCsGUI.Layout.Label("List Range", FoCsGUI.Styles.Unity.BoldLabel);
                    FoCsGUI.Layout.InfoBox("Change max number of displayed items in the lists. DEFAULT = 25");
                    var num = FoCsGUI.Layout.IntField("Total Display Count", UnityReorderableListProperty.ListLimiter.TOTAL_VISIBLE_COUNT);

                    if (cc.changed)
                    {
                        UnityReorderableListProperty.ListLimiter.TOTAL_VISIBLE_COUNT = num;
                    }
                }

                FoCsGUI.Layout.Label();
                FoCsGUI.Layout.Label();
                ShowDebug = FoCsGUI.Layout.Toggle(ShowDebug? DebugEnabled : DebugDisabled, ShowDebug);

                if (ShowDebug)
                {
                    ReorderableListCacheTab.DrawGUI(owner);
                }
            }
        }
Exemplo n.º 2
0
            private static eBool PropertyFieldMaster(GUICon label, SerializedProperty property, bool includeChildren, params GUILayOpt[] options)
            {
                if (property.propertyType == SerializedPropertyType.Quaternion)
                {
                    using (var cc = Disposables.ChangeCheck()) {
                        QuaternionPropertyDrawer.Draw(GetControlRect(false, options), property, label);

                        return(GUIEvent.Create(GUILayoutUtility.GetLastRect(), cc.changed));
                    }
                }

                var val = EditorGUILayout.PropertyField(property, includeChildren, options);

                return(GUIEvent.Create(GUILayoutUtility.GetLastRect(), val));
            }