static void EditorManager_EditorModeChanged(object sender, EditorModeChangedArgs e) { if (e._newMode == EditorManager.Mode.EM_PLAYING_IN_EDITOR || e._newMode == EditorManager.Mode.EM_PLAYING_IN_GAME) { // Set settings in the settings map ManagedBase.SettingsMap.SetSetting("AskForDebuggerOnScriptError", EditorManager.Settings.AskForDebuggerOnScriptError.ToString()); } }
static void EditorManager_EditorModeChanged(object sender, EditorModeChangedArgs e) { // Disable editing in Play-the-game mode if (EditorManager.ActiveView.CurrentContext is TerrainEditingBaseContext && e._newMode == EditorManager.Mode.EM_PLAYING_IN_GAME) { EditorManager.ActiveView.SetDefaultContext(); } }
void EditorManager_EditorModeChanged(object sender, EditorModeChangedArgs e) { GetWorldRuntimeCollisionParams(); // refresh grid reflecting any changes to the physics module collision filter UpdateStatus(); // We didn't have a chance to configure the VDB port at Engine startup - so let's do it when changing the Editor Mode, which is the // earliest point at which the VDB connection is stepped anyway. HavokManaged.ManagedModule.SetVisualDebuggerPort(EditorManager.Settings.VisualDebuggerPort); }
//this functions gets called if the mode in the editor is changed private void EditorManager_EditorModeChanged(object sender, EditorModeChangedArgs e) { if (e._newMode == EditorManager.Mode.EM_NONE) { this.Image = _buttonIconPlay; this.DropDown = _play_Dropdown; //reactivate dropdown menu if (_loopTimer.Enabled) //if timer is running, stop it { _loopTimer.Stop(); _loopTimer.Tick -= new EventHandler(TimerElapsed); } } else { this.Image = _buttonIconStop; this.DropDown = null; //deactivate dropdown menu } }
void EditorManager_EditorModeChanged(object sender, EditorModeChangedArgs e) { if ((EditorManager.Scene == null) || (EditorManager.Scene.AllShapesOfType(typeof(HavokAiEditorPlugin.Shapes.HavokNavMeshShape)).Count == 0)) { return; } if (e.action == EditorModeChangedArgs.Action.ModeChanged) { if (e._newMode == EditorManager.Mode.EM_NONE) { HavokAiManaged.ManagedModule.SetConnectToPhysicsWorld(false); } else if (e._newMode == EditorManager.Mode.EM_PLAYING_IN_EDITOR || e._newMode == EditorManager.Mode.EM_PLAYING_IN_GAME) { if (_panel.WantPhysicsConnection()) { HavokAiManaged.ManagedModule.SetConnectToPhysicsWorld(true); } } } }
void EditorManager_EditorModeChanged(object sender, EditorModeChangedArgs e) { if ((EditorManager.Scene == null) || (EditorManager.Scene.AllShapesOfType(typeof(HavokAiEditorPlugin.Shapes.HavokNavMeshShape)).Count == 0)) return; if (e.action == EditorModeChangedArgs.Action.ModeChanged) { if (e._newMode == EditorManager.Mode.EM_NONE) { HavokAiManaged.ManagedModule.SetConnectToPhysicsWorld(false, true); } else if (e._newMode == EditorManager.Mode.EM_PLAYING_IN_EDITOR || e._newMode == EditorManager.Mode.EM_PLAYING_IN_GAME) { if (_panel.WantPhysicsConnection()) { HavokAiManaged.ManagedModule.SetConnectToPhysicsWorld(true, false); } } } }
/// <summary> /// Respond to play mode changed /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void EditorManager_EditorModeChanged(object sender, EditorModeChangedArgs e) { // update the play button (play/stop button image) if (e.action == EditorModeChangedArgs.Action.ModeChanged) { switch (e._newMode) { case EditorManager.Mode.EM_NONE: { if (_lastActivePlayMode == EditorManager.Mode.EM_ANIMATING) toolStripDropDownButton_PlayMode.Image = global::Editor.Properties.Resources.toolbar_play_animate; else if (_lastActivePlayMode == EditorManager.Mode.EM_PLAYING_IN_EDITOR) toolStripDropDownButton_PlayMode.Image = global::Editor.Properties.Resources.toolbar_play_editor; else if (_lastActivePlayMode == EditorManager.Mode.EM_PLAYING_IN_GAME) toolStripDropDownButton_PlayMode.Image = global::Editor.Properties.Resources.toolbar_play_game; toolStripDropDownButton_PlayMode.DropDown = _play_Dropdown; View.Dock = System.Windows.Forms.DockStyle.Fill; } break; case EditorManager.Mode.EM_ANIMATING: { toolStripDropDownButton_PlayMode.Image = global::Editor.Properties.Resources.toolbar_stop_animate; toolStripDropDownButton_PlayMode.DropDown = null; } break; case EditorManager.Mode.EM_PLAYING_IN_EDITOR: { toolStripDropDownButton_PlayMode.Image = global::Editor.Properties.Resources.toolbar_stop_editor; toolStripDropDownButton_PlayMode.DropDown = null; } break; case EditorManager.Mode.EM_PLAYING_IN_GAME: { toolStripDropDownButton_PlayMode.Image = global::Editor.Properties.Resources.toolbar_stop_game; toolStripDropDownButton_PlayMode.DropDown = null; } break; } } }
static void EditorManager_EditorModeChanged(object sender, EditorModeChangedArgs e) { if(e._newMode == EditorManager.Mode.EM_PLAYING_IN_EDITOR || e._newMode == EditorManager.Mode.EM_PLAYING_IN_GAME) { // Set settings in the settings map ManagedBase.SettingsMap.SetSetting("AskForDebuggerOnScriptError", EditorManager.Settings.AskForDebuggerOnScriptError.ToString()); } }
/// <summary> /// Respond to play mode changed /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void EditorManager_EditorModeChanged(object sender, EditorModeChangedArgs e) { // update the play button (play/stop button image), the export button etc. if (e.action==EditorModeChangedArgs.Action.ModeChanged) { UpdateMainToolbarStates(); UpdateStatusBar(); } }
void EditorManager_EditorModeChanged(object sender, EditorModeChangedArgs e) { GetWorldRuntimeCollisionParams(); // refresh grid reflecting any changes to the physics module collision filter UpdateStatus(); }
/// <summary> /// Respond if the play mode is about to be changed to check if interim backup of layers should be created before changing the mode. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void EditorManager_BeforeEditorModeChanging(object sender, EditorModeChangedArgs e) { // Save the scene before starting Run in Editor or Play the Game if the option is enabled and the scene is dirty if (EditorManager.Settings.SaveSceneBackupOnRun && EditorManager.Scene != null && EditorManager.Scene.Dirty && // Editor Mode may be changed without having a scene loaded in the vForge tests. (e._newMode == EditorManager.Mode.EM_PLAYING_IN_EDITOR || e._newMode == EditorManager.Mode.EM_PLAYING_IN_GAME)) { EditorManager.Scene.SaveSceneLayerInterimBackups(); } }