Example #1
0
        /// <summary>
        /// Initialize ready made drawers by <paramref name="options"/>.
        /// </summary>
        /// <param name="options"></param>
        public virtual void InitializeReadyMadeDrawers(ReadyMadeDrawerOptions options)
        {
            if (options.UseReadyMadeHeader)
            {
                AddDrawHeaderCallback();
            }

            if (options.UseReadyMadeElement)
            {
                AddDrawElementPropertyCallback();
            }

            if (options.UseReadyMadeBackground)
            {
                AddDrawElementBackgroundCallback();
            }
        }
Example #2
0
        /// <summary>
        ///  Constructor for customizable developpers.
        /// </summary>
        /// <param name="sourceProperty"></param>
        /// <param name="drawerOptions"></param>
        /// <param name="useFoldout"></param>
        public ReorderableList(
            SerializedProperty sourceProperty,
            ReadyMadeDrawerOptions drawerOptions,
            bool useFoldout = true)
        {
            if (sourceProperty == null)
            {
                throw new System.ArgumentNullException("listProperty");
            }

            this.SourceProperty = sourceProperty;
            this.UseFoldout     = useFoldout;

            InitializeNative(sourceProperty);

            InitializeReadyMadeDrawers(drawerOptions);
        }