private static IEnumerator Coro(string message) { while (!SingletonBehaviour <CanvasSpawner> .Instance.MenuLoaded) { yield return(null); } while (DV.AppUtil.IsPaused) { yield return(null); } while (SingletonBehaviour <CanvasSpawner> .Instance.IsOpen) { yield return(null); } yield return(WaitFor.Seconds(1f)); MenuScreen?menuScreen = SingletonBehaviour <CanvasSpawner> .Instance.CanvasGO.transform.Find("TutorialPrompt")?.GetComponent <MenuScreen>(); TutorialPrompt?tutorialPrompt = menuScreen?.GetComponentInChildren <TutorialPrompt>(includeInactive: true); if (menuScreen != null && tutorialPrompt != null) { tutorialPrompt.SetText(message); SingletonBehaviour <CanvasSpawner> .Instance.Open(menuScreen, pauseGame : false); } }
public static void Postfix(MenuScreen __instance) { if (HarmonyPatchInfo.ModInfoFile == "modInfo.json") { if (__instance is ModManagerManualInstructionScreen screen) { screen.ContinueButton.GetComponentInChildren <TextMeshProUGUI>(true) .text = "Manage Harmony mods"; screen.OpenManualFolderButton.GetComponentInChildren <TextMeshProUGUI>(true).text = "Skip Harmony manager"; MonoBehaviour.Destroy(screen.GetComponentInChildren <RawImage>()); var texts = screen.GetComponentsInChildren <TextMeshProUGUI>(true); texts[1].text = "Click this button if you'd like to skip the Harmony mod manager and load the Harmony mods that according to the previous configuration!"; texts[5].text = "Or click this button if you'd like to select which Harmony mods should be enabled or disabled!"; texts[5].transform.localPosition = new Vector3(texts[5].transform.localPosition.x + 190, texts[5].transform.localPosition.y - 90, texts[5].transform.localPosition.z); if (Tweaks.settings.AutoSkipFinalizeScreen || (AllowAutoContinue && PlayerSettingsManager.Instance.PlayerSettings.UseModsAlways)) { screen.OpenManualFolderButton.OnInteract(); } } } else if (ManualButtonPatch.AutoCloseManager && __instance is ModManagerManualInstructionScreen ManualScreen) { ManualScreen.ContinueButton.OnInteract(); } else if (__instance is ModManagerMainMenuScreen MenuScreen) { MenuScreen.SteamWorkshopBrowserButton.gameObject.SetActive(false); MenuScreen.GetComponentInChildren <TextMeshProUGUI>().text = "Harmony Mod Manager"; var image = MenuScreen.GetComponentInChildren <RawImage>(); image.texture = HarmonyPatchInfo.HarmonyTexture; image.transform.localScale = new Vector3(image.transform.localScale.x + 1, image.transform.localScale.y, image.transform.localScale.z); MenuScreen.ManageModsButton.GetComponentInChildren <TextMeshProUGUI>(true).text = "Manage Harmony mods"; if (ManualButtonPatch.AutoCloseManager) { MenuScreen.ReturnToGameButton.OnInteract(); } } else if (__instance is ManageModsScreen ManagerScreen) { ManagerScreen.GetComponentInChildren <TextMeshProUGUI>().text = "Manage installed Harmony mods"; } }