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(); }
public CommentBlockView AddCommentBlock(CommentBlock block) { graph.AddCommentBlock(block); block.OnCreated(); return(AddCommentBlockView(block)); }
public void RemoveCommentBlock(CommentBlock block) { commentBlocks.Remove(block); }
public void AddCommentBlock(CommentBlock block) { graph.AddCommentBlock(block); block.OnCreated(); AddCommentBlockView(block); }
public void AddCommentBlock(CommentBlock block) { commentBlocks.Add(block); }