Exemple #1
0
        public static NodePresenter Create(Vector2 position)
        {
            var nodeView = new SetBackgroundNodeView(LocalizationStrings.SetBackgroundNode, position);
            var connectionPointInPresenter  = new ConnectionPointPresenter(new ConnectionPointView(nodeView, ConnectionPointType.In));
            var connectionPointOutPresenter = new ConnectionPointPresenter(new ConnectionPointView(nodeView, ConnectionPointType.Out));
            var nodeData      = new SetBackgroundNodeData();
            var nodePresenter = new SetBackgroundNodePresenter(nodeView, nodeData, connectionPointInPresenter, connectionPointOutPresenter);

            return(nodePresenter);
        }
Exemple #2
0
        public SetBackgroundNodePresenter(SetBackgroundNodeView nodeView,
                                          NodeData nodeData,
                                          ConnectionPointPresenter connectionPointInPresenter,
                                          ConnectionPointPresenter connectionPointOutPresenter) :
            base(nodeView, nodeData, connectionPointInPresenter, connectionPointOutPresenter)
        {
            _nodeView = nodeView;

            var parameter = new NodeParameter("Texture Path")
            {
                IsClickable = true
            };

            parameter.Clicked += OnTextureParameterClicked;

            _nodeParametersPanel = new NodeParametersPanel(new List <NodeParameter>
            {
                parameter
            });
        }