protected override void _drawGUI(int id) { GUILayout.BeginVertical(); AtmosphereAutopilot aa = AtmosphereAutopilot.Instance; foreach (var pair in aa.getVesselModules(aa.ActiveVessel)) { draw_row(pair.Value, pair.Key.Name); } // custom behaviour for hotkey manager AutoHotkey hm = aa.hotkeyManager; if (hm != null) { draw_row(hm, "Hotkeys manager"); } GUILayout.EndVertical(); }
void Start() { Debug.Log("[AtmosphereAutopilot]: starting up!"); DontDestroyOnLoad(this); determine_aerodynamics(); get_csurf_module(); get_gimbal_modules(); initialize_types(); hotkeyManager = new AutoHotkey(autopilot_module_types); initialize_thread(); GameEvents.onVesselChange.Add(vesselSwitch); GameEvents.onGameSceneLoadRequested.Add(sceneSwitch); GameEvents.onHideUI.Add(OnHideUI); GameEvents.onShowUI.Add(OnShowUI); GameEvents.onGUIApplicationLauncherReady.Add(onAppLauncherLoad); GameEvents.onGUIApplicationLauncherUnreadifying.Add(onAppLauncherUnload); GameEvents.onGamePause.Add(OnApplicationPause); GameEvents.onGameUnpause.Add(OnApplicationUnpause); Instance = this; ActiveVessel = null; }