/// <summary> /// Updates the current editor mode based on input conditions set by the Editor control's implementation. /// </summary> private void UpdateCurrentMode() { if (currentControl == null) { foreach (IEditorControl control in editorControls) { if (!control.ValidateInput()) { continue; } currentControl = control; control.OnModeEnter(); break; } } else if (!currentControl.ValidateInput()) { currentControl.OnModeExit(); currentControl = null; } }