Exemple #1
0
        protected override Tuple <bool, bool, Type> PullState()
        {
            if (target.IsValid())
            {
                return(Tuple.New(
                           target.IsSerializationCorrupt(),
                           GetLayoutState().ShouldAlwaysShowRecoveryFields(),
                           target.GetTargetType()
                           ));
            }

            return(new Tuple <bool, bool, Type>());
        }
Exemple #2
0
        public bool TryGetContents(out EditTarget value)
        {
            value = new EditTarget(GetAllContents(), GetTarget());

            if (value.IsValid())
            {
                return(true);
            }

            return(false);
        }
Exemple #3
0
        protected override Type PullState()
        {
            Type       type;
            EditTarget target = GetProperty().GetContents();

            if (target.IsValid())
            {
                target.ForcePropertyValue("type")
                .TryGetContentValues <Type>(out type);

                return(type);
            }

            return(null);
        }
Exemple #4
0
        protected override EditorGUIElement PushState()
        {
            EditTarget target = GetProperty().GetContents();
            EditorGUIElement_Container_Flow_Multiline container = new EditorGUIElement_Container_Flow_Multiline();

            if (target.IsValid())
            {
                EditProperty_Array property = target.ForcePropertyArray("percents");

                container.AddFixedChild(32.0f, new EditorGUIElement_EditPropertyArray_ArraySize(property));
                container.AddWeightedChild(1.0f, new EditorGUIElement_EditPropertyArray_FloatSequence(property));
            }

            return(container);
        }
Exemple #5
0
        protected override EditorGUIElement PushState()
        {
            EditTarget target = GetProperty().GetContents();
            EditorGUIElement_Container_Flow_Multiline container = new EditorGUIElement_Container_Flow_Multiline();

            if (target.IsValid())
            {
                container.AddWeightedChild(0.3f, target.ForceProperty("type").CreateEditorGUIElement());
                container.AddWeightedChild(0.2f, target.ForceProperty("name").CreateEditorGUIElement());
                container.AddWeightedChild(0.4f,
                                           new EditorGUIElement_Complex_EditPropertySingleValue_TypedObject(
                                               target.ForcePropertyValue("value"),
                                               target.ForcePropertyValue("type")
                                               )
                                           );
            }

            return(container);
        }