Пример #1
0
        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);
                }
            }
        }
Пример #2
0
 private static void DrawInitializer(Rect rect, ref ValueDefinition definition, ref bool isExpanded)
 {
     ExpressionControl.DrawFoldout(rect, definition.Initializer, _initializerLabel, ref isExpanded, true);
 }