private void newItemToolStripMenuItem_Click(object sender, EventArgs e) { bool done = false; CanvasElement ca = new CanvasElement( new Point(20, canvas.Height / 2 - 40), dialogSystem.AddDialogueItem(false) ); for (int i = 0; i < elements.Count; i++) { if (elements[i] == null) { elements[i] = ca; done = true; break; } } if (!done) { elements.Add(ca); } canvas.Invalidate(); }
public CanvasEventElement(Point p, DialogueSystem ds) : base(p, ds.AddDialogueItem(true)) { isEvent = true; }