예제 #1
0
    public override void Start()
    {
        FormElement formElement = geoController.EdgeForm(geoEdge);

        activePanel.SetEdge(formElement);

        Vector2 position = geoCamera.WorldToViewPoint(geometry.EdgeCenter(geoEdge));

        elementPanel.SetPositionByAnchor(position);

        elementPanel.OnElementClickColor = (element, color) =>
        {
            geometry.SetElementColor(element, color);
            geometryBehaviour.GeometryElementColorChange(geoEdge, color);
        };

        elementPanel.OnElementClickStyle = (element, style) =>
        {
            geometry.SetElementStyle(element, style);
            geometryBehaviour.GeometryElementStyleChange(geoEdge, style);
        };

        elementPanel.OnElementVisible = () =>
        {
            return(geometryBehaviour.GeometryElementDiaplay(geoEdge));
        };

        elementPanel.OnElementClickDisplay = (visible) =>
        {
            geometryBehaviour.GeometryElementDiaplayChange(geoEdge, visible);
        };

        elementPanel.OnElementClickDelete = () =>
        {
            if (geoEdge.isBased)
            {
                return;
            }

            elementPanel.Close();
            geoController.EndOperation();
            geoController.DeleteEdgeOperation(geoEdge);
        };

        elementPanel.OnClose = () =>
        {
            geoController.EndOperation();
        };


        elementPanel.SetEdge(geoEdge);
    }
예제 #2
0
    public override void OnClickElement(GeoElement element)
    {
        FormElement form = null;

        if (element is GeoVertex)
        {
            form = geoController.VertexForm((GeoVertex)element);
        }
        else if (element is GeoEdge)
        {
            form = geoController.EdgeForm((GeoEdge)element);
        }
        else if (element is GeoFace)
        {
            form = geoController.FaceForm((GeoFace)element);
        }
        if (form != null)
        {
            inputPanel.InputFields(form.fields);
        }
    }