Example #1
0
    public override void Start()
    {
        FormElement formElement = geoController.FaceForm(geoFace);

        activePanel.SetFace(formElement);

        Vector2 position = geoCamera.WorldToViewPoint(geometry.FaceCenter(geoFace));

        elementPanel.SetPositionByAnchor(position);

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

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

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

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

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

            elementPanel.Close();
            geoController.EndOperation();
            geoController.DeleteFaceOperation(geoFace);
        };


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

        elementPanel.SetFace(geoFace);
    }