public static IEnumerator GameplaySettingsMenuCoroutine() { if (shellInstance == null) { GameObject HMXshellpage = GameObject.Find("ShellPage_Settings"); shellInstance = GameObject.Instantiate(HMXshellpage, DebugTextPosition, Quaternion.Euler(0, 100, 0)); shellInstance.name = "Custom_Page"; SP = shellInstance.GetComponent <ShellPage>(); Transform page = shellInstance.transform.GetChild(0); for (int i = 0; i < page.childCount; i++) { Transform child = page.GetChild(i); if (child.gameObject.name.Contains("backParent")) { child.gameObject.SetActive(false); } } Transform ShellPanelCenter = page.transform.GetChild(0); Transform Settings = ShellPanelCenter.transform.GetChild(2); Transform Options = Settings.transform.GetChild(0); OM = Options.GetComponent <OptionsMenu>(); } SP.SetPageActive(true, true); yield return(new WaitForSeconds(0.005f)); OM.ShowPage(OptionsMenu.Page.Gameplay); }
private static void SpawnSecondaryPanel(GameObject secondaryPanel) { songItemPanel = secondaryPanel.GetComponent <ShellPage>(); songItemPanel.SetPageActive(true, true); songItemPanel.gameObject.transform.GetChild(0).GetChild(1).gameObject.SetActive(false); // Removes the back button MelonCoroutines.Start(WaitForSpawningMenu(secondaryPanel)); }
static public void AddPageButton(OptionsMenu optionsMenu, int col) { optionsMenu.AddButton(col, "Download Songs", new System.Action(() => { GoToArenaPage(optionsMenu); if (songItemPanel != null) { songItemPanel.SetPageActive(true); } }), null, "Download new maps from the Audica Modding Discord"); }
public static IEnumerator SetPanelActive(bool active) { SP.SetPageActive(active, true); if (active) { yield return(new WaitForSeconds(0.005f)); OM.ShowPage(OptionsMenu.Page.Gameplay); } yield return(null); }
static public void AddPageButton(OptionsMenu optionsMenu, int col) { primaryMenu = optionsMenu; primaryMenu.AddButton(col, "Download Songs", new Action(() => { GoToWebSearchPage(); if (songItemPanel != null) { songItemPanel.SetPageActive(true); } }), null, "Download new maps from the Audica Modding Discord"); }
private static void OpenModSettingsMenu() { MenuState.I.mainPage.SetPageActive(false, false); modMenuSP.SetPageActive(true, true); MelonCoroutines.Start(WaitForPageOpen(PreparePage)); }