private void Draw(Rect rect, IList list, int index) { var command = _composition.CustomCommands[index]; var labelRect = RectHelper.TakeWidth(ref rect, _labelWidth); EditorGUI.LabelField(labelRect, command.Name); using (var changes = new EditorGUI.ChangeCheckScope()) { ExpressionControl.DrawFoldout(rect, command.Expression, GUIContent.none); if (changes.changed) { _composition.SetExpression(index, command.Expression); } } }
private static void DrawInitializer(Rect rect, ref ValueDefinition definition, ref bool isExpanded) { ExpressionControl.DrawFoldout(rect, definition.Initializer, _initializerLabel, ref isExpanded, true); }