Exemple #1
0
        public void Initialize(BaseGraphView graphView, CommentBlock block)
        {
            commentBlock = block;
            owner        = graphView;

            title = block.title;
            SetPosition(block.position);

            headerContainer.Q <TextField>().RegisterCallback <ChangeEvent <string> >(TitleChangedCallback);
            titleLabel = headerContainer.Q <Label>();

            colorField = new ColorField {
                value = commentBlock.color, name = "headerColorPicker"
            };
            colorField.RegisterValueChangedCallback(e =>
            {
                UpdateCommentBlockColor(e.newValue);
            });
            UpdateCommentBlockColor(commentBlock.color);

            headerContainer.Add(colorField);

            InitializeInnerNodes();
        }
Exemple #2
0
 public CommentBlockView AddCommentBlock(CommentBlock block)
 {
     graph.AddCommentBlock(block);
     block.OnCreated();
     return(AddCommentBlockView(block));
 }
Exemple #3
0
 public void RemoveCommentBlock(CommentBlock block)
 {
     commentBlocks.Remove(block);
 }
 public void AddCommentBlock(CommentBlock block)
 {
     graph.AddCommentBlock(block);
     block.OnCreated();
     AddCommentBlockView(block);
 }
Exemple #5
0
 public void AddCommentBlock(CommentBlock block)
 {
     commentBlocks.Add(block);
 }