/// <summary> /// Updates the state of the controller. /// </summary> private void SetInputUIState() { ModuleEmissiveController activeController = inputActive as ModuleEmissiveController; if (activeController != null) { activeController.SetUiEnabled(status); } ModuleEmissiveController inactiveController = inputInactive as ModuleEmissiveController; if (inactiveController != null) { inactiveController.SetUiEnabled(!status); } }
protected override void OnUiEnabled(bool enabled) { base.OnUiEnabled(enabled); BlinkEnabledField.guiActiveEditor = enabled; OnMillisField.guiActiveEditor = enabled && blinkEnabled; OffMillisField.guiActiveEditor = enabled && blinkEnabled; PhaseField.guiActiveEditor = enabled && blinkEnabled; ModuleEmissiveController onController = sourceOn as ModuleEmissiveController; if (onController != null) { onController.SetUiEnabled(enabled); } ModuleEmissiveController offController = sourceOff as ModuleEmissiveController; if (offController != null) { offController.SetUiEnabled(enabled); } }