public ClassDiagramRoot() { bar = new DiagramToolBar (); bar.position.x = 6; bar.position.y = 60; bar.Add (new DiagramToolElement (bar, Config.TEX_TOOL_COMPOSITE, Config.TEX_TOOL_REFERENCE, new DiagramDefaultTool ())); bar.Add (new DiagramToolElement (bar, Config.TEX_TOOL_COMPOSITE, Config.TEX_TOOL_REFERENCE, new DiagramConnectTool ())); bar.Add (new DiagramToolElement (bar, Config.TEX_TOOL_COMPOSITE, Config.TEX_TOOL_REFERENCE, new DiagramConnectTool ())); bar.Add (new DiagramToolElement (bar, Config.TEX_TOOL_COMPOSITE, Config.TEX_TOOL_REFERENCE, new DiagramConnectTool ())); DiagramNode node1 = new DiagramNode (); node1.attributes.Add (new Attribute ()); node1.attributes.Add (new Attribute ()); node1.attributes.Add (new Attribute ()); DiagramNode node2 = new DiagramNode (); DiagramNode node3 = new DiagramNode (); DiagramEdge edge1 = new DiagramEdge (); edge1.SetSource (node1); edge1.SetTarget (node2); node1.edges.Add (edge1); nodes.Add (node1); nodes.Add (node2); nodes.Add (node3); classes = new ClassNode [1]; classes [0] = new ClassNode (); diagramName = "diagram name"; types = new string[]{"int", "float", "string", "bool", "Color", "Vector2", "Vector3", "Vector4", "AnimationCurve","Rect", "Texture", "Texture2D", "Object"}; }
public DiagramToolElement(DiagramToolBar bar, Texture2D texNormal, Texture2D texActive, DiagramTool tool) { this.bar = bar; this.index = index; this.texActive = texActive; this.texNormal = texNormal; this.tool = tool; }