public void Update() { if (!compatible || !HighLogic.LoadedSceneIsEditor) { return; } UpdateTankType(); UpdateUtilization(); CalculateMass(); EditorLogic editor = EditorLogic.fetch; if (editor.editorScreen == EditorScreen.Actions && EditorActionGroups.Instance.GetSelectedParts().Contains(part)) { TankWindow.ShowGUI(this); } }
public void Update() { if (!compatible || !HighLogic.LoadedSceneIsEditor) { return; } UpdateTankType(); UpdateUtilization(); CalculateMass(); bool inEditorActionsScreen = (EditorLogic.fetch?.editorScreen == EditorScreen.Actions); bool partIsSelectedInActionsScreen = inEditorActionsScreen && (EditorActionGroups.Instance?.GetSelectedParts().Contains(part) ?? false); if (partIsSelectedInActionsScreen) { TankWindow.ShowGUI(this); } }
public void Update() { if (compatible && HighLogic.LoadedSceneIsEditor) { UpdateTankType(); UpdateUtilization(); CalculateMass(); bool inEditorActionsScreen = (EditorLogic.fetch?.editorScreen == EditorScreen.Actions); bool partIsSelectedInActionsScreen = inEditorActionsScreen && (EditorActionGroups.Instance?.GetSelectedParts().Contains(part) ?? false); if (partIsSelectedInActionsScreen || showUI) { TankWindow.ShowGUI(this); } else { TankWindow.HideGUIForModule(this); } } UpdateRF(); }
public void ShowUI() { TankWindow.ShowGUI(this); UpdateMenus(true); }