예제 #1
0
        private void RemovePathLink()
        {
            if (CurrentPathLink == null)
            {
                return;
            }
            if (CurrentPathNode == null)
            {
                return;
            }

            var r = CurrentPathNode.RemoveLink(CurrentPathLink);

            if (!r)
            {
                return;
            }

            LoadPathNodeTabPage();

            if (ProjectForm.WorldForm != null)
            {
                ProjectForm.WorldForm.UpdatePathNodeGraphics(CurrentPathNode, false);
            }
        }
예제 #2
0
        private void PathNodePositionTextBox_TextChanged(object sender, EventArgs e)
        {
            if (populatingui)
            {
                return;
            }
            if (CurrentPathNode == null)
            {
                return;
            }
            Vector3 v      = FloatUtil.ParseVector3String(PathNodePositionTextBox.Text);
            bool    change = false;

            lock (ProjectForm.ProjectSyncRoot)
            {
                if (CurrentPathNode.Position != v)
                {
                    CurrentPathNode.SetPosition(v);
                    ProjectForm.SetYndHasChanged(true);
                    change = true;
                }
            }
            if (change)
            {
                if (ProjectForm.WorldForm != null)
                {
                    ProjectForm.WorldForm.SetWidgetPosition(CurrentPathNode.Position);
                    ProjectForm.WorldForm.UpdatePathNodeGraphics(CurrentPathNode, false);
                }
                //PathNodePositionTextBox.Text = FloatUtil.GetVector3String(CurrentPathNode.Position);
            }
        }
예제 #3
0
        private void AddPathLink()
        {
            if (CurrentPathNode == null)
            {
                return;
            }

            var l = CurrentPathNode.AddLink();

            LoadPathNodeTabPage();

            PathNodeLinksListBox.SelectedItem = l;

            if (ProjectForm.WorldForm != null)
            {
                ProjectForm.WorldForm.UpdatePathNodeGraphics(CurrentPathNode, false);
            }
        }