Fix displaying multiple structure parameters in Visject Surface parameters panel
This commit is contained in:
@@ -29,6 +29,26 @@ namespace FlaxEditor.CustomEditors.Elements
|
||||
Properties = new PropertiesList(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds object property editor. Selects proper <see cref="CustomEditor"/> based on overrides.
|
||||
/// </summary>
|
||||
/// <param name="name">The property name.</param>
|
||||
/// <param name="values">The values.</param>
|
||||
/// <param name="overrideEditor">The custom editor to use. If null will detect it by auto.</param>
|
||||
/// <returns>The created element.</returns>
|
||||
public CustomEditor Property(string name, ValueContainer values, CustomEditor overrideEditor = null)
|
||||
{
|
||||
var editor = CustomEditorsUtil.CreateEditor(values, overrideEditor);
|
||||
var style = editor.Style;
|
||||
if (style == DisplayStyle.Group)
|
||||
{
|
||||
var group = Group(name, editor, true);
|
||||
group.Panel.Open();
|
||||
return group.Object(values, editor);
|
||||
}
|
||||
return Object(values, editor);
|
||||
}
|
||||
|
||||
internal readonly List<PropertyNameLabel> Labels = new List<PropertyNameLabel>();
|
||||
|
||||
internal void OnAddProperty(string name, string tooltip)
|
||||
|
||||
@@ -427,7 +427,7 @@ namespace FlaxEditor.Surface
|
||||
propertyLabel.MouseLeftDoubleClick += (label, location) => StartParameterRenaming(pIndex, label);
|
||||
propertyLabel.SetupContextMenu += OnPropertyLabelSetupContextMenu;
|
||||
var property = itemLayout.AddPropertyItem(propertyLabel, tooltipText);
|
||||
property.Object(propertyValue);
|
||||
property.Property("Value", propertyValue);
|
||||
}
|
||||
CustomEditors.Editors.GenericEditor.OnGroupUsage();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user