void Awake() { this.Log("Awake"); TACMenuAppLToolBar = new AppLauncherToolBar("TACLifeSupport", "TAC Life Support", Textures.PathToolbarIconsPath + "/TACgreenIconTB", ApplicationLauncher.AppScenes.SPH | ApplicationLauncher.AppScenes.VAB, (Texture)Textures.GrnApplauncherIcon, (Texture)Textures.GrnApplauncherIcon, GameScenes.EDITOR); window = new BuildAidWindow(TACMenuAppLToolBar, TacStartOnce.Instance.globalSettings); }
internal void Start() { Utilities.Log_Debug("DeepFreezeGUI startup"); windowID = Utilities.getnextrandomInt(); CFwindowID = Utilities.getnextrandomInt(); KACwindowID = Utilities.getnextrandomInt(); VSwindowID = Utilities.getnextrandomInt(); VSFwindowID = Utilities.getnextrandomInt(); DFwindowPos = new Rect(40, Screen.height / 2 - 100, DFWINDOW_WIDTH, WINDOW_BASE_HEIGHT); CFwindowPos = new Rect(450, Screen.height / 2 - 100, CFWINDOW_WIDTH, 250); DFKACwindowPos = new Rect(600, Screen.height / 2 - 100, KACWINDOW_WIDTH, WINDOW_BASE_HEIGHT); DFVSwindowPos = new Rect(Screen.width / 2 - VSWINDOW_WIDTH / 2, Screen.height / 2 - 100, VSWINDOW_WIDTH, WINDOW_BASE_HEIGHT); DFVSFwindowPos = new Rect(Screen.width / 2 - VSWINDOW_WIDTH / 2, Screen.height / 2 - 100, VSWINDOW_WIDTH, WINDOW_BASE_HEIGHT); DFtxtWdthName = Mathf.Round((DFWINDOW_WIDTH - 28f) * .28f); DFtxtWdthProf = Mathf.Round((DFWINDOW_WIDTH - 28f) * .2f); DFtxtWdthVslN = Mathf.Round((DFWINDOW_WIDTH - 28f) * .28f); KACtxtWdthName = Mathf.Round((KACWINDOW_WIDTH - 38f) * .2f); KACtxtWdthAtyp = Mathf.Round((KACWINDOW_WIDTH - 38f) * .1f); KACtxtWdthATme = Mathf.Round((KACWINDOW_WIDTH - 38f) * .2f); KACtxtWdthKName = Mathf.Round((KACWINDOW_WIDTH - 48f) * .2f); KACtxtWdthKTyp = Mathf.Round((KACWINDOW_WIDTH - 48f) * .2f); KACtxtWdthKTg1 = Mathf.Round((KACWINDOW_WIDTH - 48f) * .16f); KACtxtWdthKTg2 = Mathf.Round((KACWINDOW_WIDTH - 48f) * .16f); DFvslWdthName = Mathf.Round((DFWINDOW_WIDTH - 28f) * .28f); DFvslPrtName = Mathf.Round((DFWINDOW_WIDTH - 28f) * .2f); DFvslPrtTmp = Mathf.Round((DFWINDOW_WIDTH - 28f) * .1f); DFvslPrtElec = Mathf.Round((DFWINDOW_WIDTH - 28f) * .1f); DFvslAlarms = Mathf.Round((DFWINDOW_WIDTH - 28f) * .12f); DFvslLstUpd = Mathf.Round((DFWINDOW_WIDTH - 28f) * .18f); DFvslRT = Mathf.Round((DFWINDOW_WIDTH - 28f) * .12f); Utilities.setScaledScreen(); DFMenuAppLToolBar = new AppLauncherToolBar("DeepFreeze", "DeepFreeze", "REPOSoftTech/DeepFreeze/Icons/DFtoolbar", ApplicationLauncher.AppScenes.SPACECENTER | ApplicationLauncher.AppScenes.FLIGHT | ApplicationLauncher.AppScenes.MAPVIEW | ApplicationLauncher.AppScenes.SPH | ApplicationLauncher.AppScenes.VAB | ApplicationLauncher.AppScenes.TRACKSTATION, GameDatabase.Instance.GetTexture("REPOSoftTech/DeepFreeze/Icons/DeepFreezeOn", false), GameDatabase.Instance.GetTexture("REPOSoftTech/DeepFreeze/Icons/DeepFreezeOff", false), GameScenes.FLIGHT, GameScenes.EDITOR, GameScenes.SPACECENTER, GameScenes.TRACKSTATION); //If Settings wants to use ToolBar mod, check it is installed and available. If not set the TST Setting to use Stock. if (!ToolbarManager.ToolbarAvailable && Useapplauncher) { Useapplauncher = true; } DFMenuAppLToolBar.Start(Useapplauncher); Utilities.Log_Debug("DeepFreezeGUI END startup"); }
public void Awake() { Utilities.Log("TSTMenu awake in " + HighLogic.LoadedScene); if (HighLogic.LoadedScene != GameScenes.SPACECENTER && HighLogic.LoadedScene != GameScenes.FLIGHT) { Utilities.Log("TSTMenu Not SpaceCenter or Flight Scene, Destroying this instance."); Destroy(this); } TSTwindowID = Utilities.getnextrandomInt(); FTTwindowID = Utilities.getnextrandomInt(); SCwindowID = Utilities.getnextrandomInt(); RT2Present = Utilities.IsRTInstalled; TSTMenuAppLToolBar = new AppLauncherToolBar("TST", "Tarsier Space Tech", "TarsierSpaceTech/Icons/ToolbarIcon", (ApplicationLauncher.AppScenes.SPACECENTER | ApplicationLauncher.AppScenes.FLIGHT), GameDatabase.Instance.GetTexture("TarsierSpaceTech/Icons/TSTIconOn", false), GameDatabase.Instance.GetTexture("TarsierSpaceTech/Icons/TSTIconOff", false), GameScenes.SPACECENTER, GameScenes.FLIGHT); Utilities.Log("Awake complete"); }