Example #1
0
 public override void OnDestroy()
 {
     base.OnDestroy();
     clear_fields();
     TCAToolbarManager.AttachTCA(null);
     GameEvents.onGameStateSave.Remove(save_config);
     GameEvents.onVesselChange.Remove(onVesselChange);
 }
Example #2
0
 static bool init()
 {
     clear_fields();
     TCAToolbarManager.AttachTCA(null);
     TCA = ModuleTCA.AvailableTCA(vessel);
     if (TCA == null)
     {
         return(false);
     }
     if (CFG != null)
     {
         window_enabled = CFG.GUIVisible;
     }
     TCAToolbarManager.AttachTCA(TCA);
     create_fields();
     update_configs();
     return(true);
 }
Example #3
0
 bool init()
 {
     clear_fields();
     TCAToolbarManager.AttachTCA(null);
     TCA = ModuleTCA.AvailableTCA(vessel);
     if (TCA == null || CFG == null)
     {
         return(false);
     }
     ShowInstance(CFG.GUIVisible);
     ModulesGraph.SetCFG(CFG);
     TCAToolbarManager.AttachTCA(TCA);
     create_fields();
     if (ADV != null)
     {
         ADV.UpdateNamedConfigs();
     }
     return(true);
 }
 bool init()
 {
     clear_fields();
     ClearStatus();
     TCAToolbarManager.AttachTCA(null);
     TCA = ModuleTCA.AvailableTCA(vessel);
     if (TCA == null || CFG == null)
     {
         return(false);
     }
     ActiveVesselTCA   = ModuleTCA.AvailableTCA(FlightGlobals.ActiveVessel);
     HaveRemoteControl = ActiveVesselTCA != null && ActiveVesselTCA.GetModule <SquadControl>() != null;
     RemoteControl     = ActiveVesselTCA != TCA;
     ShowInstance(CFG.GUIVisible);
     ModulesGraph.SetCFG(CFG);
     TCAToolbarManager.AttachTCA(TCA);
     create_fields();
     if (ADV != null)
     {
         ADV.UpdateNamedConfigs();
     }
     return(true);
 }