void MakeSingleLine(QuadLine quad) { bool result = quad.AttachLineToMouse(lastMousePosition); if (result) { lastConnectedQuad = quad; lineAttachedToMouse = true; } }
void MakeConnectedLine(QuadLine quad) { bool result = quad.ConnectWithQuad(1, lastConnectedQuad); if (result) { lineAttachedToMouse = false; lastConnectedQuad.ConnectWithQuad(0, quad); lastConnectedQuad = null; } }
void MakeLineBetweenQuads(QuadLine quad) { if (lastConnectedQuad == quad) { return; } if (lastConnectedQuad == null) { MakeSingleLine(quad); } else { MakeConnectedLine(quad); } }
void DeleteSingleLine() { lastConnectedQuad.DeleteLine(); lastConnectedQuad = null; lineAttachedToMouse = false; }