Ejemplo n.º 1
0
 public void CreateButton()
 {
     ButtonNeeded = Proximity.IsRelevant();
     if (ButtonNeeded)
     {
         MakeButton();
     }
     else if (toolbarControl != null)
     {
         toolbarControl.buttonActive = false;
     }
 }
Ejemplo n.º 2
0
        public void CreateButton()
        {
            //print("@@@CreateButton - CreateButtons called");

            buttonNeeded = Proximity.IsRelevant();
            if (buttonNeeded)
            {
                MakeButton();
            }
            else
            {
                ApplicationLauncher.Instance.RemoveModApplication(stockToolbarBtn);
            }
        }
Ejemplo n.º 3
0
        void ToggleOnRightClick()
        {
            if (FlightGlobals.ActiveVessel != null)
            {
                List <Proximity> prox = FlightGlobals.ActiveVessel.FindPartModulesImplementing <Proximity>();

                if (prox != null && prox.Count > 0)
                {
                    Proximity p = prox.FirstOrDefault();
                    if (p != null)
                    {
                        p.ToggleSystemOn();
                    }
                    return;
                }
            }
        }