/// <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(); }
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(); } }
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); }
/// <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); }
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); }
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); }
/// <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(); }
/// <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(); }
/// <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); }