internal void Save() { Util.Logger.Log("Saving config!"); config.SetBool(sectionCore, useCustomMenuSongs, UseCustomMenuSongs); config.SetBool(sectionCore, loop, Loop); config.SetFloat(sectionCore, menuMusicVolume, MenuMusicVolume); config.SetBool(sectionNowPlaying, showNowPlaying, ShowNowPlaying); config.SetInt(sectionNowPlaying, nowPlayingLocation, NowPlayingLocation); config.SetInt(sectionNowPlaying, nowPlayingColor, NowPlayingColor); CustomMenuMusicController.instance.GetSongsList(); StartCoroutine(SetVolume()); NowPlaying.instance?.SetCurrentSong(ShowNowPlaying ? CustomMenuMusicController.instance?.CurrentSongPath : String.Empty); NowPlaying.instance?.SetTextColor(NowPlayingColor); NowPlaying.instance?.SetLocation((Location)NowPlayingLocation); }
public static void SaveConfig() { File.WriteAllText(votedSongsPath, JsonConvert.SerializeObject(votedSongs, Formatting.Indented), Encoding.UTF8); File.WriteAllText(reviewedSongsPath, JsonConvert.SerializeObject(reviewedSongs, Formatting.Indented), Encoding.UTF8); File.WriteAllLines(favSongsPath, favoriteSongs.Distinct().ToArray(), Encoding.UTF8); config.SetString("BeatSaverDownloader", "beatsaverURL", beatsaverURL); config.SetBool("BeatSaverDownloader", "disableDeleteButton", disableDeleteButton); config.SetBool("BeatSaverDownloader", "deleteToRecycleBin", deleteToRecycleBin); config.SetBool("BeatSaverDownloader", "enableSongIcons", enableSongIcons); config.SetBool("BeatSaverDownloader", "rememberLastPackAndSong", rememberLastPackAndSong); config.SetInt("BeatSaverDownloader", "maxSimultaneousDownloads", maxSimultaneousDownloads); config.SetInt("BeatSaverDownloader", "fastScrollSpeed", fastScrollSpeed); config.SetString("BeatSaverDownloader", "lastSelectedPack", lastSelectedPack ?? ""); config.SetString("BeatSaverDownloader", "lastSelectedSong", lastSelectedSong ?? ""); config.SetInt("BeatSaverDownloader", "lastSelectedSortMode", (int)lastSelectedSortMode); }
public static void Save() { Config.SetBool(PrefsSection, "Enabled", DisplayLyrics); Config.SetFloat(PrefsSection, nameof(DisplayDelay), DisplayDelay); Config.SetFloat(PrefsSection, nameof(HideDelay), HideDelay); Config.SetBool(PrefsSection, nameof(VerboseLogging), VerboseLogging); Config.SetBool(PrefsSection, "Text Shaking", Shake); Config.SetInt(PrefsSection, "Font Size", FontSize); Config.SetInt(PrefsSection, "ColorR", (int)(TextColor.r * 255f)); Config.SetInt(PrefsSection, "ColorG", (int)(TextColor.g * 255f)); Config.SetInt(PrefsSection, "ColorB", (int)(TextColor.b * 255f)); Config.SetInt(PrefsSection, "ColorA", (int)(TextColor.a * 255f)); Config.SetFloat(PrefsSection, "PosX", Position.x); Config.SetFloat(PrefsSection, "PosY", Position.y); Config.SetFloat(PrefsSection, "PosZ", Position.z); }
public static void CreateUI() { var enableToggle = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.PlayerSettingsRight, "Accurate Hit Score", "Apply Combo to Hit Scores", null, 0); enableToggle.GetValue = isEnabled; enableToggle.OnToggle += (value) => { isEnabled = value; config.SetBool("Settings", "Enabled", value); }; }
public void OnSceneLoaded(Scene scene, LoadSceneMode sceneMode) { if (scene.name == "MenuViewControllers") { if (SongLoader.reqDialog == null) { SongLoader.InitRequirementsMenu(); } var subMenuCC = GameplaySettingsUI.CreateSubmenuOption(GameplaySettingsPanels.PlayerSettingsLeft, "Song Loader", "MainMenu", "songloader", "Songloader Options"); var colorOverrideOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.PlayerSettingsLeft, "Allow Custom Song Colors", "songloader", "Allow Custom Songs to override note/light colors if Custom Colors or Chroma is installed"); colorOverrideOption.GetValue = ModPrefs.GetBool("Songloader", "customSongColors", true, true); colorOverrideOption.OnToggle += delegate(bool value) { ModPrefs.SetBool("Songloader", "customSongColors", value); }; var platformOverrideOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.PlayerSettingsLeft, "Allow Custom Song Platforms", "songloader", "Allow Custom Songs to override your Custom Platform if Custom Platforms is installed"); platformOverrideOption.GetValue = ModPrefs.GetBool("Songloader", "customSongPlatforms", true, true); platformOverrideOption.OnToggle += delegate(bool value) { ModPrefs.SetBool("Songloader", "customSongPlatforms", value); }; } }
public static void Write() { config.SetBool("PP Helper", "showInfo", showInfo); config.SetFloat("PP Helper", "defaultAcc", defaultAcc); config.SetBool("PP Helper", "ppTop", ppTop); config.SetFloat("PP Helper", "accIncrement", accIncrement); config.SetFloat("PP Helper", "starRange", starRange); config.SetString("PP Helper", "starAccChoice", starAccChoice.ToString()); config.SetInt("PP Helper", "numberOfScores", numberOfScores); config.SetBool("PP Helper", "accOverride", accOverride); config.SetBool("PP Helper", "autoUpdate", autoUpdate); config.SetBool("PP Helper", "playHistory", playHistory); config.SetString("PP Helper", "sortMethod", sortMethod.ToString()); config.SetBool("PP Helper", "ignoreNoFail", ignoreNoFail); config.SetBool("PP Helper", "hideOnStart", hideOnStart); config.SetInt("PP Helper", "decimalPrecision", decimalPrecision); }
public static void Write() { PersistentSingleton <SharedCoroutineStarter> .instance.StartCoroutine(DisableWatcherTemporaryCoroutine()); _config.SetBool(Plugin.Name, "parabola", parabola); _config.SetFloat(Plugin.Name, "parabolaOffsetY", parabolaOffsetY); _config.SetBool(Plugin.Name, "boxing", boxing); _config.SetBool(Plugin.Name, "hideSabers", hideSabers); _config.SetBool(Plugin.Name, "hideSaberEffects", hideSaberEffects); _config.SetBool(Plugin.Name, "centering", centering); _config.SetBool(Plugin.Name, "noBlue", noBlue); _config.SetBool(Plugin.Name, "noRed", noRed); _config.SetBool(Plugin.Name, "redToBlue", redToBlue); _config.SetBool(Plugin.Name, "blueToRed", blueToRed); _config.SetBool(Plugin.Name, "oneColorRed", oneColorRed); _config.SetBool(Plugin.Name, "feetModifiers", feetModifiers); _config.SetBool(Plugin.Name, "feet", feet); _config.SetBool(Plugin.Name, "noDirection", noDirection); _config.SetBool(Plugin.Name, "ignoreBadColor", ignoreBadColor); _config.SetBool(Plugin.Name, "flatNotes", flatNotes); _config.SetBool(Plugin.Name, "feetAvatar", feetAvatar); _config.SetBool(Plugin.Name, "disableStatistics", disableStatistics); _config.SetBool(Plugin.Name, "ninjaModifiers", ninjaModifiers); _config.SetBool(Plugin.Name, "fourSabers", fourSabers); _config.SetBool(Plugin.Name, "reverseGrip", reverseGrip); _config.SetBool(Plugin.Name, "topNotesToFeet", topNotesToFeet); _config.SetBool(Plugin.Name, "middleNotesToFeet", middleNotesToFeet); _config.SetBool(Plugin.Name, "bottomNotesToFeet", bottomNotesToFeet); _config.SetBool(Plugin.Name, "headbang", headbang); _config.SetBool(Plugin.Name, "superhot", superhot); _config.SetBool(Plugin.Name, "vacuum", vacuum); _config.SetBool(Plugin.Name, "ninjaMaster", ninjaMaster); }
public static void CreateUI() { var songCoreSubMenu = GameplaySettingsUI.CreateSubmenuOption(GameplaySettingsPanels.PlayerSettingsLeft, "SongCore", "MainMenu", "songcore", "SongCore Options"); var colorOverrideOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.PlayerSettingsLeft, "Allow Custom Song Colors", "songcore", "Allow Custom Songs to override note/light colors if Custom Colors or Chroma is installed"); colorOverrideOption.GetValue = ModPrefs.GetBool("SongCore", "customSongColors", true, true); colorOverrideOption.OnToggle += delegate(bool value) { Plugin.customSongColors = value; ModPrefs.SetBool("SongCore", "customSongColors", value); }; var platformOverrideOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.PlayerSettingsLeft, "Allow Custom Song Platforms", "songcore", "Allow Custom Songs to override your Custom Platform if Custom Platforms is installed"); platformOverrideOption.GetValue = ModPrefs.GetBool("SongCore", "customSongPlatforms", true, true); platformOverrideOption.OnToggle += delegate(bool value) { Plugin.customSongPlatforms = value; ModPrefs.SetBool("SongCore", "customSongPlatforms", value); }; }
private void OnNoArrowsRandomOptionToggle(bool option) { NoArrowsOption = option; config.SetBool(Name, Option, option); }
public static void Write() { ModPrefs.SetBool("IntroSkip", "allowIntroSkip", AllowIntroSkip); ModPrefs.SetBool("IntroSkip", "allowOutroSkip", AllowOutroSkip); }
public static void Write() { config.SetBool("PlaneVisualizer", "enabled", enabled); config.SetBool("PlaneVisualizer", "practiceEnable", practiceEnable); }
public static void Write() { config.SetBool(Plugin.Name, "parabola", parabola); config.SetFloat(Plugin.Name, "parabolaOffsetY", parabolaOffsetY); config.SetBool(Plugin.Name, "boxing", boxing); config.SetBool(Plugin.Name, "hideSabers", hideSabers); config.SetBool(Plugin.Name, "hideSaberEffects", hideSaberEffects); config.SetBool(Plugin.Name, "centering", centering); config.SetBool(Plugin.Name, "noBlue", noBlue); config.SetBool(Plugin.Name, "noRed", noRed); config.SetBool(Plugin.Name, "redToBlue", redToBlue); config.SetBool(Plugin.Name, "blueToRed", blueToRed); config.SetBool(Plugin.Name, "feet", feet); config.SetBool(Plugin.Name, "noDirection", noDirection); config.SetBool(Plugin.Name, "ignoreBadColor", ignoreBadColor); config.SetBool(Plugin.Name, "flatNotes", flatNotes); config.SetBool(Plugin.Name, "feetAvatar", feetAvatar); config.SetBool(Plugin.Name, "headbang", headbang); config.SetBool(Plugin.Name, "superhot", superhot); config.SetBool(Plugin.Name, "vacuum", vacuum); }