private void UpdateGUIControl() { if (Input.GetKeyDown(guiToogleKey.ToLower())) { if (KAS_Shared.GetAllWinch(FlightGlobals.ActiveVessel).Count > 0) { KAS_Shared.DebugLog(KAS_Shared.GetAllWinch(FlightGlobals.ActiveVessel).Count + " winch has been found on the vessel, showing GUI..."); KASAddonWinchGUI.ToggleGUI(); } else { KASAddonWinchGUI.ShowGUI(false); } } }
void OnVesselChange(Vessel vess) { if (vesselOpenGui.Contains(FlightGlobals.ActiveVessel)) { if (KAS_Shared.GetAllWinch(FlightGlobals.ActiveVessel).Count > 0) { GuiActive = true; } else { ShowGUI(false); } } else { GuiActive = false; } }