示例#1
0
 public Vector4Properties(ExposeProperties owner, PropertyInfo info, ExposePropertyAttribute attribute)
     : base(owner, attribute.Order, info)
 {
     _Field = new Skill.Editor.UI.Vector4Field();
     _Field.ValueChanged += Vector4Field_ValueChanged;
     _Field.Label         = attribute.Name;
 }
示例#2
0
 public AnimationCurveProperties(ExposeProperties owner, PropertyInfo info, ExposePropertyAttribute attribute)
     : base(owner, attribute.Order, info)
 {
     _CurveField               = new Skill.Editor.UI.CurveField();
     _CurveField.Label.text    = attribute.Name;
     _CurveField.Label.tooltip = attribute.Description;
 }
示例#3
0
 public ControlProperties(ExposeProperties owner, int order, PropertyInfo info)
 {
     this.Owner = owner;
     this.Order = order;
     this.Info  = info;
     this.Index = -1;
 }
示例#4
0
 public Vector3Properties(ExposeProperties owner, PropertyInfo info, ExposePropertyAttribute attribute)
     : base(owner, attribute.Order, info)
 {
     _Field = new Skill.Editor.UI.Vector3Field();
     _Field.ValueChanged += Vector3Field_ValueChanged;
     _Field.Label.text    = attribute.Name;
     _Field.Label.tooltip = attribute.Description;
 }
示例#5
0
 public UnityObjectProperties(ExposeProperties owner, PropertyInfo info, ExposePropertyAttribute attribute)
     : base(owner, attribute.Order, info)
 {
     _Field = new Skill.Editor.UI.UntypedObjectField(Info.PropertyType.IsArray ? Info.PropertyType.GetElementType() : Info.PropertyType);
     _Field.ObjectChanged += ObjectField_ValueChanged;
     _Field.Label.text     = attribute.Name;
     _Field.Label.tooltip  = attribute.Description;
 }
示例#6
0
 public EnumProperties(ExposeProperties owner, PropertyInfo info, ExposePropertyAttribute attribute)
     : base(owner, attribute.Order, info)
 {
     _Field               = new Skill.Editor.UI.EnumPopup();
     _Field.Label.text    = attribute.Name;
     _Field.Label.tooltip = attribute.Description;
     _Field.ValueChanged += EnumPopup_ValueChanged;
 }
示例#7
0
 public IntegerProperties(ExposeProperties owner, PropertyInfo info, ExposePropertyAttribute attribute)
     : base(owner, attribute.Order, info)
 {
     _Field = new Skill.Editor.UI.IntField();
     _Field.ValueChanged  += IntField_ValueChanged;
     _Field.Label.text     = attribute.Name;
     _Field.Label.tooltip  = attribute.Description;
     _Field.ChangeOnReturn = false;
 }
示例#8
0
 public BooleanProperties(ExposeProperties owner, PropertyInfo info, ExposePropertyAttribute attribute)
     : base(owner, attribute.Order, info)
 {
     _Field               = new Skill.Editor.UI.ToggleButton();
     _Field.Left          = false;
     _Field.Label.text    = attribute.Name;
     _Field.Label.tooltip = attribute.Description;
     _Field.Changed      += ToggleButton_Changed;
 }
示例#9
0
            public SerializableObjectProperties(ExposeProperties owner, PropertyInfo info, ExposePropertyAttribute attribute)
                : base(owner, attribute.Order, info)
            {
                _ExposeProperties        = new SerializableObjectExposeProperties(null, Owner);
                _ExposeProperties.Margin = new Framework.UI.Thickness(4, 0, 0, 0);

                _Expander = new VerticalExpander(_ExposeProperties);

                _Name = _Expander.Foldout.Content.text = attribute.Name;
                _Expander.Foldout.Content.tooltip = attribute.Description;
            }
示例#10
0
            public StringProperties(ExposeProperties owner, PropertyInfo info, ExposePropertyAttribute attribute)
                : base(owner, attribute.Order, info)
            {
                object[] attributes = info.GetCustomAttributes(true);
                PasteTextFieldAttribute pasteTextFieldAttribute = null;
                AreaFieldAttribute      areaAtt = null;

                System.Type ptType = typeof(PasteTextFieldAttribute);
                System.Type aType  = typeof(AreaFieldAttribute);
                foreach (object o in attributes)
                {
                    if (o.GetType() == ptType)
                    {
                        pasteTextFieldAttribute = (PasteTextFieldAttribute)o;
                    }
                    if (o.GetType() == aType)
                    {
                        areaAtt = (AreaFieldAttribute)o;
                    }
                }



                if (pasteTextFieldAttribute != null)
                {
                    _PasteTextField = new PasteTextField(pasteTextFieldAttribute.Persian, areaAtt != null);
                    _TextField      = _PasteTextField.TextField;
                    if (areaAtt != null)
                    {
                        _PasteTextField.Height = Mathf.Max(18, areaAtt.Height);
                    }
                }
                else
                {
                    _TextField = new Skill.Editor.UI.TextField();
                    if (areaAtt != null)
                    {
                        _TextField.Height = Mathf.Max(18, areaAtt.Height);
                    }
                }
                _TextField.TextChanged  += TextField_ValueChanged;
                _TextField.Label.text    = attribute.Name;
                _TextField.Label.tooltip = attribute.Description;
            }
示例#11
0
            public ArrayProperties(ExposeProperties owner, PropertyInfo info, ExposePropertyAttribute attribute)
                : base(owner, attribute.Order, info)
            {
                _Fields    = new List <ControlProperties>();
                _SizeField = new IntField()
                {
                    Value = 0, ChangeOnReturn = true
                };
                _SizeField.ValueChanged += _SizeField_ValueChanged;
                _Panel = new Framework.UI.StackPanel()
                {
                    Orientation = Framework.UI.Orientation.Vertical
                };
                _Panel.Margin = new Framework.UI.Thickness(4, 0, 0, 0);
                _Panel.Controls.Add(_SizeField);

                _Expander = new VerticalExpander(_Panel);

                _Expander.Foldout.Content.text    = attribute.Name;
                _Expander.Foldout.Content.tooltip = attribute.Description;
            }
示例#12
0
 public SerializableObjectExposeProperties(object obj, ExposeProperties owner)
     : base(obj)
 {
     _Owner = owner;
 }