コード例 #1
0
        /// <summary>
        /// Updates the property grid when the selection changed
        /// </summary>
        private void OnSelectionChanged(object sender, ShapeSelectionChangedArgs e)
        {
            if (EditorManager.GUI.UIUpdateLock > 0)
            {
                return;
            }

            SelectedObjects = e.NewSelection.ToArray();
            UpdateHelpPanel();
        }
コード例 #2
0
 public void UIEditor_ShapeSelectionChanged(object sender, ShapeSelectionChangedArgs e)
 {
     if (e.NewSelection.Contains(this) == true)
     {
         base.OnSelected();
         OnSelected();
     }
     else if (this.Selected == true)
     {
         base.OnUnSelected();
         OnUnSelected();
     }
 }
コード例 #3
0
        void EditorManager_ShapeSelectionChanged(object sender, ShapeSelectionChangedArgs e)
        {
            if ((EditorManager.Scene == null) || (EditorManager.Scene.AllShapesOfType(typeof(HavokAiEditorPlugin.Shapes.HavokNavMeshShape)).Count == 0))
            {
                return;
            }

            int  numPaths = 0;
            bool showPath = false;

            foreach (ShapeBase shape in e.NewSelection)
            {
                if (shape is HavokAiEditorPlugin.Shapes.HavokNavMeshTestPathShape)
                {
                    numPaths++;
                    HavokAiEditorPlugin.Shapes.HavokNavMeshTestPathShape path = shape as HavokAiEditorPlugin.Shapes.HavokNavMeshTestPathShape;
                    showPath = path.Visible;
                }
            }
            _panel.EnablePathDependentControls(numPaths == 1, showPath);
        }
コード例 #4
0
        /// <summary>
        /// Listen to the selection change so that we can open a script document
        /// Same behavior as ScriptPanel_VisibleChanged.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void EditorManager_ShapeSelectionChanged(object sender, ShapeSelectionChangedArgs e)
        {
            if (!this.Visible || !GlobalSettings._bEditScriptOnShapeSelection)
            {
                return;
            }

            ShapeCollection sel = e.NewSelection;

            // select script only if we select a single shape with a script
            if (sel == null || sel.Count != 1)
            {
                return;
            }

            string script = sel[0].ScriptFile;

            if (string.IsNullOrEmpty(script))
            {
                return;
            }

            this.AddDocument(script);
        }
コード例 #5
0
        void EditorManager_ShapeSelectionChanged(object sender, ShapeSelectionChangedArgs e)
        {
            if ((EditorManager.Scene == null) || (EditorManager.Scene.AllShapesOfType(typeof(HavokAiEditorPlugin.Shapes.HavokNavMeshShape)).Count == 0))
            return;

              int numPaths = 0;
              bool showPath = false;
              foreach (ShapeBase shape in e.NewSelection)
              {
            if (shape is HavokAiEditorPlugin.Shapes.HavokNavMeshTestPathShape)
            {
              numPaths++;
              HavokAiEditorPlugin.Shapes.HavokNavMeshTestPathShape path = shape as HavokAiEditorPlugin.Shapes.HavokNavMeshTestPathShape;
              showPath = path.Visible;
            }
              }
              _panel.EnablePathDependentControls(numPaths == 1, showPath);
        }
コード例 #6
0
ファイル: EnginePanel.cs プロジェクト: elemen/projectanarchy
        private void EditorManager_ShapeSelectionChanged(object sender, ShapeSelectionChangedArgs e)
        {
            ToolStripButton_IsolateSelection.Enabled = (ToolStripButton_IsolateSelection.Checked || EditorManager.SelectedShapes.Count > 0);
              ToolStripButton_ZoomFit.Image = (EditorManager.SelectedShapes.Count > 0) ? Properties.Resources.frame_selected : Properties.Resources.frame_all;
              ToolStripButton_ZoomFit.ToolTipText = (EditorManager.SelectedShapes.Count > 0) ? "Focus On Selection" : "Focus Scene";

              updateTransformStrip();

              // Update focus if enabled
              if (EditorManager.Settings.FocusOnSelection)
            FocusOnSelection();

              EditorManager.ActiveView.UpdateView(false);
        }
コード例 #7
0
        /// <summary>
        /// Updates the property grid when the selection changed
        /// </summary>
        private void OnSelectionChanged(object sender, ShapeSelectionChangedArgs e)
        {
            if (EditorManager.GUI.UIUpdateLock > 0)
            return;

              SelectedObjects = e.NewSelection.ToArray();
              UpdateHelpPanel();
        }
コード例 #8
0
ファイル: Form1.cs プロジェクト: bgarrels/projectanarchy
        /// <summary>
        /// Respond to changing shape selection
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void EditorManager_ShapeSelectionChanged(object sender, ShapeSelectionChangedArgs e)
        {
            this.UpdateCopyPasteToolbar();
              UpdateSelectionSetButton();

              // Show properties panel if option is enabled
              if (EditorManager.Settings.ShowPropertiesPanelOnSelection)
            propertyPanel1.ShowDockable();
        }
コード例 #9
0
        /// <summary>
        /// Listen to the selection change so that we can open a script document
        /// Same behavior as ScriptPanel_VisibleChanged.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void EditorManager_ShapeSelectionChanged(object sender, ShapeSelectionChangedArgs e)
        {
            if (!this.Visible || !GlobalSettings._bEditScriptOnShapeSelection)
            return;

              ShapeCollection sel = e.NewSelection;

              // select script only if we select a single shape with a script
              if (sel == null || sel.Count != 1)
            return;

              string script = sel[0].ScriptFile;
              if (string.IsNullOrEmpty(script))
            return;

              this.AddDocument(script);
        }