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; }
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; }
public ControlProperties(ExposeProperties owner, int order, PropertyInfo info) { this.Owner = owner; this.Order = order; this.Info = info; this.Index = -1; }
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; }
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; }
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; }
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; }
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; }
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; }
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; }
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; }
public SerializableObjectExposeProperties(object obj, ExposeProperties owner) : base(obj) { _Owner = owner; }