internal void ShowMoreSongsFlow() { if (_moreSongsFlowCooridinator == null) { _moreSongsFlowCooridinator = BeatSaberUI.CreateFlowCoordinator <MoreSongsFlowCoordinator>(); } BeatSaberMarkupLanguage.BeatSaberUI.MainFlowCoordinator.PresentFlowCoordinator(_moreSongsFlowCooridinator); // ("PresentFlowCoordinator", _moreSongsFlowCooridinator, null, false, false); }
internal void ShowMoreSongsFlow() { if (_moreSongsFlowCooridinator == null) { _moreSongsFlowCooridinator = BeatSaberUI.CreateFlowCoordinator <MoreSongsFlowCoordinator>(); } _moreSongsFlowCooridinator.SetParentFlowCoordinator(BeatSaberMarkupLanguage.BeatSaberUI.MainFlowCoordinator); BeatSaberMarkupLanguage.BeatSaberUI.MainFlowCoordinator.PresentFlowCoordinator(_moreSongsFlowCooridinator, null, ViewController.AnimationDirection.Horizontal, true); // ("PresentFlowCoordinator", _moreSongsFlowCooridinator, null, false, false); }
private void ShowMoreSongsFlow() { if (_moreSongsFlowCoordinator == null) { _moreSongsFlowCoordinator = BeatSaberUI.CreateFlowCoordinator <MoreSongsFlowCoordinator>(); } _moreSongsFlowCoordinator.SetParentFlowCoordinator(BeatSaberUI.MainFlowCoordinator); BeatSaberUI.MainFlowCoordinator.PresentFlowCoordinator(_moreSongsFlowCoordinator, null, ViewController.AnimationDirection.Horizontal, true); }
public void BeatSaverButtonPressed() { if (moreSongsFlowCoordinator == null) { moreSongsFlowCoordinator = new GameObject("MoreSongsFlowCoordinator").AddComponent <MoreSongsFlowCoordinator>(); } MainFlowCoordinator mainFlow = Resources.FindObjectsOfTypeAll <MainFlowCoordinator>().First(); mainFlow.InvokeMethod("PresentFlowCoordinator", moreSongsFlowCoordinator, null, false, false); }
private IEnumerator SetupUI() { if (initialized) { yield break; } RectTransform mainMenu = (Resources.FindObjectsOfTypeAll <MainMenuViewController>().First().rectTransform); var downloaderSubMenu = SettingsUI.CreateSubMenu("Downloader"); var disableDeleteButton = downloaderSubMenu.AddBool("Disable delete button"); disableDeleteButton.GetValue += delegate { return(PluginConfig.disableDeleteButton); }; disableDeleteButton.SetValue += delegate(bool value) { PluginConfig.disableDeleteButton = value; PluginConfig.SaveConfig(); }; var deleteToRecycleBin = downloaderSubMenu.AddBool("Delete to Recycle Bin"); deleteToRecycleBin.GetValue += delegate { return(PluginConfig.deleteToRecycleBin); }; deleteToRecycleBin.SetValue += delegate(bool value) { PluginConfig.deleteToRecycleBin = value; PluginConfig.SaveConfig(); }; var enableSongIcons = downloaderSubMenu.AddBool("Enable additional song icons"); enableSongIcons.GetValue += delegate { return(PluginConfig.enableSongIcons); }; enableSongIcons.SetValue += delegate(bool value) { PluginConfig.enableSongIcons = value; PluginConfig.SaveConfig(); }; var maxSimultaneousDownloads = downloaderSubMenu.AddInt("Max simultaneous downloads", 1, 10, 1); maxSimultaneousDownloads.GetValue += delegate { return(PluginConfig.maxSimultaneousDownloads); }; maxSimultaneousDownloads.SetValue += delegate(int value) { PluginConfig.maxSimultaneousDownloads = value; PluginConfig.SaveConfig(); }; var fastScrollSpeed = downloaderSubMenu.AddInt("Fast scroll speed", 2, 20, 1); fastScrollSpeed.GetValue += delegate { return(PluginConfig.fastScrollSpeed); }; fastScrollSpeed.SetValue += delegate(int value) { PluginConfig.fastScrollSpeed = value; PluginConfig.SaveConfig(); }; _moreSongsButton = MenuButtonUI.AddButton("More songs", "Download more songs from BeatSaver.com!", BeatSaverButtonPressed); _moreSongsButton.interactable = SongLoader.AreSongsLoaded; MenuButtonUI.AddButton("More playlists", PlaylistsButtonPressed); if (moreSongsFlowCoordinator == null) { moreSongsFlowCoordinator = new GameObject("MoreSongsFlowCoordinator").AddComponent <MoreSongsFlowCoordinator>(); } yield return(null); initialized = true; }