public static void CreateUI() { var toggleOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersLeft, "Show Notes Left Counter", "MainMenu", "Shows the amount of notes left in the song as you progress"); toggleOption.GetValue = ModPrefs.GetBool("NotesLeftCounter", "showNoteCounter", true, true); toggleOption.OnToggle += (value) => { ShowNoteCounter = value; ModPrefs.SetBool("NotesLeftCounter", "showNoteCounter", value); }; }
public static void InitializeMenu() { if (!initialized) { initialized = true; RGBLightsEnabled = ModPrefs.GetBool("ChromaLite", "RGBLights", true); SpecialEventsEnabled = ModPrefs.GetBool("ChromaLite", "SpecialEvents", false); } GameplaySettingsUI.CreateSubmenuOption(GameplaySettingsPanels.PlayerSettingsRight, "ChromaLite", "MainMenu", "CLite", "ChromaLite events options"); ToggleOption rgbLightsToggle = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.PlayerSettingsRight, "RGB Lights", "CLite", "Enable/Disable RGB lighting events."); rgbLightsToggle.GetValue = RGBLightsEnabled; rgbLightsToggle.OnToggle += delegate(bool value) { RGBLightsEnabled = value; ModPrefs.SetBool("ChromaLite", "RGBLights", value); }; rgbLightsToggle.AddConflict("Darth Maul"); ToggleOption specialEventsToggle = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.PlayerSettingsRight, "Special Events", "CLite", "Enable/Disable Special Events, such as note size changing, player heal/harm events, and rotation events."); specialEventsToggle.GetValue = SpecialEventsEnabled; specialEventsToggle.OnToggle += delegate(bool value) { SpecialEventsEnabled = value; ModPrefs.SetBool("ChromaLite", "SpecialEvents", value); }; specialEventsToggle.AddConflict("Darth Maul"); }
public static void CreateUI() { var spoopyToggle = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersRight, "Spoopy Bloqs", "Missed a bloq? Try to hit its ghost!", null, 0); spoopyToggle.GetValue = Plugin.IsEnabled; spoopyToggle.OnToggle += (value) => { Plugin.IsEnabled = value; }; }
public static void CreateUI() { //Haven't added Icons for now, can refer to Github readme for CustomUI for adding icons, hint text is also fairly basic atm var darthMaulMenu = GameplaySettingsUI.CreateSubmenuOption(GameplaySettingsPanels.ModifiersRight, "Darth Maul Settings", "MainMenu", "DarthMaulMenu1", "Darth Maul Plugin Options"); var darthMaulToggle = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersRight, "Darth Maul", "DarthMaulMenu1", "Enable Darth Maul Mode"); darthMaulToggle.GetValue = Plugin.IsDarthModeOn; darthMaulToggle.OnToggle += (value) => { Plugin.IsDarthModeOn = value; }; var oneHandedToggle = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersRight, "One Handed", "DarthMaulMenu1", "One Handed Darth Maul"); oneHandedToggle.GetValue = Plugin.IsOneHanded; oneHandedToggle.OnToggle += (value) => { Plugin.IsOneHanded = value; }; var autoDetectToggle = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersRight, "Auto Detect", "DarthMaulMenu1", "Auto Detect seperation/attachment of sabers. No Fail Only"); autoDetectToggle.GetValue = Plugin.IsAutoDetect; autoDetectToggle.OnToggle += (value) => { Plugin.IsAutoDetect = value; }; var leftHandToggle = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersRight, "Left Main Controller", "DarthMaulMenu1", "Whether the left controller is the main controller."); leftHandToggle.GetValue = Plugin.MainController == Plugin.ControllerType.LEFT ? true : false;; leftHandToggle.OnToggle += (value) => { Plugin.MainController = value == true ? Plugin.ControllerType.LEFT : Plugin.ControllerType.RIGHT; }; }
//UI public void CreateUI() { GetIcons(); GameplaySettingsUI.CreateSubmenuOption(GameplaySettingsPanels.ModifiersLeft, "AutoPause", "MainMenu", "apMenu", "Settings for AutoPause", _autoLogo); var apEnabled = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersLeft, "Enabled", "apMenu", "Activate/Deactivate AutoPause", _onoffButton); var apWhite = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersLeft, "Low Sensitivity", "apMenu", "AutoPause will trigger for very big issues.", _sensitivty); var apYellow = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersLeft, "SensiMain", "apMenu", "AutoPause will work normally.", _sensiyellow); var apRed = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersLeft, "SensiRed", "apMenu", "AutoPause is on full alert.", _sensired); apWhite.AddConflict("SensiMain"); apWhite.AddConflict("SensiRed"); apYellow.AddConflict("Low Sensitivity"); apYellow.AddConflict("SensiRed"); apRed.AddConflict("Low Sensitivity"); apRed.AddConflict("SensiMain"); apEnabled.GetValue = AutoPauseConfig.GetBool("Main", "Enabled", true, true); apWhite.GetValue = AutoPauseConfig.GetBool("Main", "LowSense", false, true); apYellow.GetValue = AutoPauseConfig.GetBool("Main", "SensiMain", true, true); apRed.GetValue = AutoPauseConfig.GetBool("Main", "SensiRed", false, true); apEnabled.OnToggle += (value) => { AutoPauseConfig.SetBool("Main", "Enabled", value); }; apWhite.OnToggle += (value) => { AutoPauseConfig.SetBool("Main", "LowSense", value); }; apYellow.OnToggle += (value) => { AutoPauseConfig.SetBool("Main", "SensiMain", value); }; apRed.OnToggle += (value) => { AutoPauseConfig.SetBool("Main", "SensiRed", value); }; }
/// <summary> /// This is the code used to create a submenu in Beat Saber's Gameplay Settings panel. /// </summary> public static void CreateGameplayOptionsUI() { string pluginName = "$safeprojectname$"; string parentMenu = "MainMenu"; string subMenuName = "ExamplePluginMenu"; // Name of SubMenu, pass this to the settings you want to have in this menu. //Example submenu option var pluginSubmenu = GameplaySettingsUI.CreateSubmenuOption(GameplaySettingsPanels.ModifiersLeft, pluginName, parentMenu, subMenuName, "You can keep all your plugin's gameplay options nested within this one button"); //Example Toggle Option within a submenu var exampleToggle = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersLeft, "Example Toggle", subMenuName, "Put a toggle for a setting you want easily accessible in game here."); exampleToggle.GetValue = /* Fetch the initial value for the option here*/ false; exampleToggle.OnToggle += (value) => { /* You can execute whatever you want to occur when the value is toggled here, usually that would include updating wherever the value is pulled from */ Logger.log.Debug($"Toggle is {(value ? "On" : "Off")}"); }; exampleToggle.AddConflict("Conflicting Option Name"); //You can add conflicts with other gameplay options settings here, preventing both from being active at the same time, including that of other mods // Creates a list setting you can scroll through with backwards and forwards buttons. float[] floatValues = { 0f, 1f, 2f, 3f, 4f }; string[] textValues = { "ex0", "ex1", "ex2", "ex3", "ex4" }; var exampleList = GameplaySettingsUI.CreateListOption(GameplaySettingsPanels.ModifiersLeft, "Example List", subMenuName, "List example mouse over description"); exampleList.GetValue += delegate { return(Plugin.ExampleGameplayListSetting); }; for (int i = 0; i < 5; i++) { exampleList.AddOption(i, textValues[i]); } exampleList.OnChange += (value) => { // Execute code based on what value is selected. Plugin.ExampleGameplayListSetting = value; Logger.log.Debug($"Example GameplaySetting List value changed to {textValues[(int)value]}"); }; }
private static void TechnicolourSubMenuCreated(string name) { if (name == "CTT") { //We have technicolour List <Tuple <float, string> > technicolourOptions = new List <Tuple <float, string> > { { 0f, "OFF" }, { 1f, "WARM/COLD" }, { 2f, "EITHER" }, { 3f, "TRUE RANDOM" } }; MultiSelectOption techniParticles = GameplaySettingsUI.CreateListOption(GameplaySettingsPanels.PlayerSettingsRight, "Tech. Particles", "CTT", "Technicolour style of the particles."); for (int i = 0; i < technicolourOptions.Count; i++) { techniParticles.AddOption(i, technicolourOptions[i].Item2); } techniParticles.GetValue += delegate { return((int)ChromaSparksConfig.TechnicolourSparksStyle); }; techniParticles.OnChange += delegate(float value) { ColourManager.TechnicolourStyle style = ColourManager.GetTechnicolourStyleFromFloat(value); ChromaSparksConfig.TechnicolourSparksStyle = style; }; } }
public static void CreateUI() { var toggleOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersLeft, "Beat Singer", "MainMenu", "Turn on/off the BeatSinger Plugin"); toggleOption.GetValue = Config.GetBool(PrefsSection, "Enabled", true, true); toggleOption.OnToggle += delegate(bool value) { Config.SetBool(PrefsSection, "Enabled", value); DisplayLyrics = value; }; }
private void OnSceneLoaded(Scene scene, LoadSceneMode arg1) { if (scene.name == "Menu") { var disableOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.PlayerSettingsRight, "Rainbow Lighting", "MainMenu", "Enable Rainbow Lighting"); disableOption.GetValue = ModPrefs.GetBool("RainbowLighting", "Enabled", true, true); disableOption.OnToggle += (value) => { enabled = value; ModPrefs.SetBool("RainbowLighting", "Enabled", value); }; } }
public static void CreateGameplayOptionsUI() { var pluginSubmenu = GameplaySettingsUI.CreateSubmenuOption(GameplaySettingsPanels.ModifiersLeft, "Toggle Low Pass", "MainMenu", "lowPass"); var enabled = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersLeft, "Enabled", "lowPass", "Toggles low pass audio filter when in obstacles"); enabled.GetValue = PluginConfig.lowPass; enabled.OnToggle += (value) => { PluginConfig.lowPass = value; }; }
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); }; }
/// <summary> /// Adds a toggle option to the in-game "Gameplay Setup" window. It can be found in the left panel of the Player Settings /// </summary> public static void CreateGameplaySetupMenu() { hmdToggle = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.PlayerSettingsLeft, Plugin.PluginName, disclaimer, optionIcon, 0); hmdToggle.GetValue = Plugin.IsHMDOn; hmdToggle.OnToggle += ((bool value) => { Plugin.IsHMDOn = value; Logger.log.Debug($"Toggle is very '{(value ? "toggled" : "untoggled")}! Value is now '{value}'"); }); }
public static void CreateGameplayOptionsUI() { //Example submenu option var pluginSubmenu = GameplaySettingsUI.CreateSubmenuOption(GameplaySettingsPanels.ModifiersLeft, "LightSerialOutput", "MainMenu", "LightSerialOutputSettings", ""); //Example Toggle Option within a submenu var enabled = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersLeft, "Enabled", "LightSerialOutputSettings", "Toggles the plugin."); enabled.GetValue = Config.enabled; /* Fetch the initial value for the option here*/ enabled.OnToggle += (value) => { Config.enabled = value; }; /* You can execute whatever you want to occur when the value is toggled here, usually that would include updating wherever the value is pulled from */ //exampleOption.AddConflict("Conflicting Option Name"); //You can add conflicts with other gameplay options settings here, preventing both from being active at the same time, including that of other mods }
public static void CreateGameplayOptionsUI() { //Example submenu option var pluginSubmenu = GameplaySettingsUI.CreateSubmenuOption(GameplaySettingsPanels.ModifiersLeft, "Plugin Name", "MainMenu", "pluginMenu1", "You can keep all your plugin's gameplay options nested within this one button"); //Example Toggle Option within a submenu var exampleOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersLeft, "Example Toggle", "pluginMenu1", "Put a toggle for a setting you want easily accessible in game here."); exampleOption.GetValue = /* Fetch the initial value for the option here*/ false; exampleOption.OnToggle += (value) => { /* You can execute whatever you want to occur when the value is toggled here, usually that would include updating wherever the value is pulled from */ }; exampleOption.AddConflict("Conflicting Option Name"); //You can add conflicts with other gameplay options settings here, preventing both from being active at the same time, including that of other mods }
public static void CreateUI() { var restrictions1Menu = GameplaySettingsUI.CreateSubmenuOption(GameplaySettingsPanels.ModifiersLeft, "Gameplay Restrictions", "MainMenu", "restrictions1", "Set various restrictions for gameplay"); var restartFailOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersLeft, "Restart On Fail", "restrictions1", "Restart the song on failing."); restartFailOption.GetValue = Config.restartOnFail; restartFailOption.OnToggle += (value) => { Config.restartOnFail = value; Config.Save(); }; restartFailOption.AddConflict("Crash On Fail"); var crashFailOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersLeft, "Crash On Fail", "restrictions1", "Crash the game on failing."); crashFailOption.GetValue = Config.crashOnFail; crashFailOption.OnToggle += (value) => { Config.crashOnFail = value; Config.Save(); }; var restrictions2Menu = GameplaySettingsUI.CreateSubmenuOption(GameplaySettingsPanels.ModifiersLeft, "Restrictions", "restrictions1", "restrictions2", "Set restrictions here"); var failOnSaberClashOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersLeft, "Fail On Saber Clash", "restrictions2", "Better not Cross those sabers."); failOnSaberClashOption.GetValue = Config.failOnSaberClash; failOnSaberClashOption.OnToggle += (value) => { Config.failOnSaberClash = value; Config.Save(); }; var failOnMissOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersLeft, "Fail On Miss", "restrictions2", "Fail the Song on missing a note."); failOnMissOption.GetValue = Config.failOnMiss; failOnMissOption.OnToggle += (value) => { Config.failOnMiss = value; Config.Save(); }; var failOnBadCutOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersLeft, "Fail On Bad Cut", "restrictions2", "Fail the Song on cutting a note the wrong way."); failOnBadCutOption.GetValue = Config.failOnBadCut; failOnBadCutOption.OnToggle += (value) => { Config.failOnBadCut = value; Config.Save(); }; var failOnBombOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersLeft, "Fail On Bomb", "restrictions2", "Fail the Song on hitting a bomb."); failOnBombOption.GetValue = Config.failOnBomb; failOnBombOption.OnToggle += (value) => { Config.failOnBomb = value; Config.Save(); }; var failOnImperfectOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersLeft, "Fail On Imperfect Cut", "restrictions2", "Fail the Song on getting a cut below a threshold, can be changed manually in the config, default is 100."); failOnImperfectOption.GetValue = Config.failOnImperfectCut; failOnImperfectOption.OnToggle += (value) => { Config.failOnImperfectCut = value; Config.Save(); }; var failOnMissWithinFrameOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersLeft, "Fail On Miss Within Frame", "restrictions2", "Fail the Song on missing during a defined frame which can be adjusted in the config file, default is within 15% of the song's NoteCount"); failOnMissWithinFrameOption.GetValue = Config.failOnMissWithinFrame; failOnMissWithinFrameOption.OnToggle += (value) => { Config.failOnMissWithinFrame = value; Config.Save(); }; var stricterAnglesOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersLeft, "Stricter Angles", "restrictions2", "Unfinished strict angles modifier from the game, might not even do anything. \r\n <b><#FF0000>Disables Score Submission</color></b>"); stricterAnglesOption.GetValue = Config.stricterAngles; stricterAnglesOption.OnToggle += (value) => { Config.stricterAngles = value; Config.Save(); }; }
internal static void SetupUI() { Options = new List <UIOption>(); GameplaySettingsUI.CreateSubmenuOption(GameplaySettingsPanels.ModifiersLeft, "Nora's Fuckery", "MainMenu", "NorasFuckery", "im sorry"); GameplaySettingsUI.CreateSubmenuOption(GameplaySettingsPanels.ModifiersLeft, "hell", "NorasFuckery", "hell", "h"); theButton = new UIOption("the button(tm)", "hell"); CursedJump = new UIOption("cursed notejump", "hell"); GameplaySettingsUI.CreateSubmenuOption(GameplaySettingsPanels.ModifiersLeft, "score stuff", "NorasFuckery", "scorestuff", "stuff that messes with score"); lowScore = new UIOption("byebye score", "scorestuff"); }
public void OnSceneLoaded(Scene scene, LoadSceneMode sceneMode) { if (scene.name == "MenuCore") { Gamemode.Init(); ToggleOption enableToggle = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersRight, "No Fail+", "Activates No Fail in party mode with no effect on score", null, 0); enableToggle.GetValue = config.Value.Enable; enableToggle.OnToggle += (bool enabled) => { config.Value.Enable = enabled; }; } }
/// <summary> /// Creates the Toggle UI option /// </summary> public void CreateNoArrowsRandomOption() { var noArrowsIcon = UIUtilities.LoadSpriteFromResources("NoArrowsRandom.Resources.NoArrowsRandom.png"); var noArrowsRandomOption = GameplaySettingsUI.CreateToggleOption( "No Arrows Random", "Turn every song into the classic randomized No Arrows mode.", noArrowsIcon); noArrowsRandomOption.GetValue = false; noArrowsRandomOption.AddConflict("No Arrows"); noArrowsRandomOption.OnToggle += OnNoArrowsRandomOptionToggle; }
private void SceneManager_sceneLoaded(Scene arg0, LoadSceneMode arg1) { Plugin.Log($"Scene: {arg0.name}"); if (arg0.name == "Menu") { var toggle = GameplaySettingsUI.CreateToggleOption("Debris Remover", "Stops note debris from spawning entirely when you slice a note."); toggle.GetValue = Enabled; toggle.OnToggle += (b) => { Instance.Enabled = b; ModPrefs.SetBool(Name, "Enabled", Instance.Enabled); Plugin.Log($"{(b ? "Enabled" : "Disabled")}"); }; Plugin.Log("Created gameplay settings toggle!"); } }
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); }; }
void OnMenuLoaded() { if (_gamemodeToggle != null) { _gamemodeToggle.OnToggle -= OnGamemodeToggled; } _gamemodeToggle = GameplaySettingsUI.CreateToggleOption( GameplaySettingsPanels.ModifiersLeft, "Claws Mode", hintText: "Shortens saber hitboxes to 0.3m, and adjusts grip.", optionIcon: Plugin.IconSprite ); _gamemodeToggle.GetValue = Plugin.IsEnabled; _gamemodeToggle.OnToggle += OnGamemodeToggled; UpdateCapability(); }
public void AddModMenuButton() { if (_hiddenBlocksIcon == null) { _hiddenBlocksIcon = UIUtilities.LoadSpriteFromResources("HiddenBlocks.Resources.HiddenIcon.png"); } var toggle = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersLeft, "Hidden Blocks", "Makes notes and bombs invisible as they approach your position.", UIUtilities.EditIcon); toggle.AddConflict("Disappearing Arrows"); toggle.AddConflict("Ghost Notes"); toggle.GetValue = Config.EnableHiddenBlocks; toggle.OnToggle += ((bool e) => { Utilities.Log(e ? "Enabled" : "Disabled"); Config.EnableHiddenBlocks = e; Config.WritePending = true; }); }
public static void CreateGameplayOptionsUI() { //Example submenu option var pluginSubmenu = GameplaySettingsUI.CreateSubmenuOption(GameplaySettingsPanels.ModifiersLeft, "LeaderboardInSong", "MainMenu", "pluginMenu1", "Settings for the LeaderboardInSong Plugin"); //Example Toggle Option within a submenu var enableOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersLeft, "Enabled", "pluginMenu1", "Enable the in song leaderboard. Compares your score in the song against those on the leaderboard page selected when starting the song"); enableOption.GetValue = Plugin.Config.GetBool("Options", "Enabled", true, true); enableOption.OnToggle += (value) => { enabled = value; Plugin.Config.SetBool("Options", "Enabled", value); }; var accOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersLeft, "Order by Percentage", "pluginMenu1", "Order the scores in the leaderboard based on your current accuracy compared to that of the other scores rather than the scores itself"); accOption.GetValue = sortByAcc; accOption.OnToggle += (value) => { sortByAcc = value; Plugin.Config.SetBool("Options", "SortByAcc", value); }; var simpleNameOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersLeft, "Simplify Names", "pluginMenu1", "Removes excess information that scoresaber adds to scores, such as percentage, modifiers, and performance points"); simpleNameOption.GetValue = simpleNames; simpleNameOption.OnToggle += (value) => { simpleNames = value; Plugin.Config.SetBool("Options", "SimpleNames", value); }; }
//public static string full = "Full (default)"; //public static string warm = "Warm"; //public static string cool = "Cool"; //public static string pastel = "Pastel"; //public static string dark = "Dark"; //I'll add support for all of this eventually -Auros, good start tho //public enum Spectrums //{ // full, // warm, // cool, // pastel, // dark //}; private void OnSceneLoaded(Scene scene, LoadSceneMode arg1) { if (scene.name == "MenuCore" && isChromaInstalled == false) { //Settings Menu Setup var subMenuCC = SettingsUI.CreateSubMenu("Rainbow Lighting"); var disableMenu = subMenuCC.AddBool("Enabled"); disableMenu.GetValue += delegate { return(ModPrefs.GetBool("RainbowLighting", "Enabled", true, true)); }; disableMenu.SetValue += delegate(bool value) { enabled = value; ModPrefs.SetBool("RainbowLighting", "Enabled", value); }; disableMenu.EnabledText = "ON"; disableMenu.DisabledText = "OFF"; //var spectrumSelect = subMenuCC.AddList("Spectrum", new float[1] { 0 }); //spectrumSelect.FormatValue += delegate (float value) { return Spectrums[(int)value]; }; //TO DO: actual spectrum select //PlayerSettings Toggle Sprite icon = UIUtilities.LoadSpriteFromResources("RainbowLighting.Resources.icon.png"); var disableOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.PlayerSettingsRight, "Rainbow Lighting", "MainMenu", "Enable Rainbow Lighting", icon); disableOption.GetValue = ModPrefs.GetBool("RainbowLighting", "Enabled", true, true); disableOption.OnToggle += (value) => { enabled = value; ModPrefs.SetBool("RainbowLighting", "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); }; } }
internal static void SetupUI() { Options = new List <UIOption>(); GameplaySettingsUI.CreateSubmenuOption(GameplaySettingsPanels.ModifiersLeft, "Nova's Fuckery", "MainMenu", "NovasFuckery", "have fun"); ChallengeMode = new UIOption("Challenge Mode", "NovasFuckery", false).WithDescription("Randomly enables and disables mods while you play."); OneAtATime = new UIOption("One At A Time", "NovasFuckery", false); InvisibleSabers = new UIOption("Invisible Sabers", "NovasFuckery", false); UnlimitedDebris = new UIOption("Unlimited Debris"); SadTracking = new UIOption("Sad Tracking").WithDescription("pepehands"); GameplaySettingsUI.CreateSubmenuOption(GameplaySettingsPanels.ModifiersLeft, "Randomize Things", "NovasFuckery", "Randomizers", "because why not"); RandomEverything = new UIOption("Randomize All", "Randomizers"); RandomPositionX = new UIOption("Random Note Line", "Randomizers"); RandomPositionY = new UIOption("Random Note Layer", "Randomizers"); RandomDirection = new UIOption("Random Note Direction", "Randomizers"); RandomColors = new UIOption("Random Colors", "Randomizers"); RandomBombs = new UIOption("Random Bombs", "Randomizers"); GameplaySettingsUI.CreateSubmenuOption(GameplaySettingsPanels.ModifiersLeft, "Miss Hell", "NovasFuckery", "MissHell", "have fun"); PauseOnMiss = new UIOption("Pause On Miss", "MissHell"); AYYYYYOnMiss = new UIOption("AYYYY On Miss", "MissHell"); TrackingErrorOnMiss = new UIOption("Trackking Error On Miss", "MissHell"); theButton = new UIOption("nora was here ;^)", "MissHell"); GameplaySettingsUI.CreateSubmenuOption(GameplaySettingsPanels.ModifiersLeft, "Mega Jump", "NovasFuckery", "MegaJump", ""); MegaJump = new UIOption("Enabled", "MegaJump"); NJSFix = new UIOption("Fix NJS", "MegaJump"); Mirror = new UIOption("Mirror", "MegaJump"); Setup = true; }
public static void CreateGameplayOptionsUI() { var pluginSubmenu = GameplaySettingsUI.CreateSubmenuOption(GameplaySettingsPanels.ModifiersLeft, "RumbleController", "MainMenu", "RumbleController"); var enabled = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersLeft, "Enable Plugin", "RumbleController", "Toggles the plugin"); enabled.GetValue = PluginConfig.enabled; enabled.OnToggle += (value) => { PluginConfig.enabled = value; }; var noteCut = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersLeft, "Note Cut Rumble", "RumbleController", "Toggles rumble on note cut"); noteCut.GetValue = PluginConfig.noteCut; noteCut.OnToggle += (value) => { PluginConfig.noteCut = value; }; var saberClash = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersLeft, "Saber Clash Rumble", "RumbleController", "Toggles rumble on sabers clashing"); saberClash.GetValue = PluginConfig.saberClash; saberClash.OnToggle += (value) => { PluginConfig.saberClash = value; }; var obstacleRumble = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersLeft, "Wall Rumble", "RumbleController", "Toggles rumble on sabers in walls"); obstacleRumble.GetValue = PluginConfig.obstacleRumble; obstacleRumble.OnToggle += (value) => { PluginConfig.obstacleRumble = value; }; }
public static void InitializeGameplayMenu() { blindingOptionsEnabled = false;//ModPrefs.GetBool("SpinSaber", "BlindMe", false); Console.WriteLine("[SpinSaber] Initializing GameplayMenu Options..."); GameplaySettingsUI.CreateSubmenuOption(GameplaySettingsPanels.PlayerSettingsLeft, "SpinSaber", "MainMenu", "SSM", "Select SpinSaber settings"); /*ToggleOption spinSaberEnabledToggle = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.PlayerSettingsLeft, "Spin Enabled", "SSM", "Enable/Disable SpinSaber."); * spinSaberEnabledToggle.GetValue = Plugin.spinSaberEnabled; * spinSaberEnabledToggle.OnToggle += SpinSaberEnabledToggled;*/ GameplaySettingsUI.CreateSubmenuOption(GameplaySettingsPanels.PlayerSettingsLeft, "Profile", "SSM", "SSMPROFILE", "Select SpinSaber profile"); MultiSelectOption spinSaberConfigSelect = GameplaySettingsUI.CreateListOption(GameplaySettingsPanels.PlayerSettingsLeft, "SpinConfig", "SSMPROFILE", "Select your preferred spin config."); spinSaberConfigSelect.AddOption(-1, "Disabled"); if (Plugin.loadedConfigs.Count <= 0) { //spinSaberConfigSelect.AddOption(0, "No Configs Found"); } else { for (int i = 0; i < Plugin.loadedConfigs.Count; i++) { spinSaberConfigSelect.AddOption(i, Plugin.loadedConfigs[i].name); } } spinSaberConfigSelect.OnChange += SpinSaberConfigSelected; spinSaberConfigSelect.GetValue = () => lastOptionSelected; GameplaySettingsUI.CreateSubmenuOption(GameplaySettingsPanels.PlayerSettingsLeft, "Time", "SSM", "SSMTIME", "Select Time Scale"); MultiSelectOption spinSaberTimeMult = GameplaySettingsUI.CreateListOption(GameplaySettingsPanels.PlayerSettingsLeft, "Time Rate", "SSMTIME", "Multiply the speed of your selected config."); for (int i = 1; i <= 9; i++) { spinSaberTimeMult.AddOption(i / 10f, "0." + i + "x"); } spinSaberTimeMult.AddOption(1, "Default"); for (int i = 1; i <= 9; i++) { spinSaberTimeMult.AddOption(1 + (i / 10f), "1." + i + "x"); } spinSaberTimeMult.OnChange += SpinSaberTimeSelected; spinSaberTimeMult.GetValue = () => timeMult; if (blindingOptionsEnabled) { MultiSelectOption blindTimeMult = GameplaySettingsUI.CreateListOption(GameplaySettingsPanels.PlayerSettingsLeft, "Blind Time", "SSM", "Duration of being blinded."); blindTimeMult.AddOption(-1f, "Disabled"); for (int i = 0; i <= 9; i++) { for (int j = 0; j <= 9; j++) { if (i == 0 && j == 0) { continue; } blindTimeMult.AddOption(i + (j / 10f), i + "." + j + "s"); } } blindTimeMult.AddOption(10, "10.0s"); blindTimeMult.OnChange += BlindTimeSelected; blindTimeMult.GetValue = () => blindTime; MultiSelectOption visibleTimeMult = GameplaySettingsUI.CreateListOption(GameplaySettingsPanels.PlayerSettingsLeft, "Visible Time", "SSM", "Duration of visibility."); visibleTimeMult.AddOption(-1f, "Disabled"); for (int i = 0; i <= 9; i++) { for (int j = 0; j <= 9; j++) { if (i == 0 && j == 0) { continue; } visibleTimeMult.AddOption(i + (j / 10f), i + "." + j + "s"); } } visibleTimeMult.AddOption(10, "10.0s"); visibleTimeMult.OnChange += VisibleTimeSelected; visibleTimeMult.GetValue = () => visibleTime; } }
public static void CreateUI() { GetIcons(); if (BS_Utils.Gameplay.GetUserInfo.GetUserID() == 76561198047644920) { CustomUI.MenuButton.MenuButtonUI.AddButton("AYAYA", null, _GMPIcon); CustomUI.MenuButton.MenuButtonUI.AddButton("papatutuwawa", null, _GMPIcon); CustomUI.MenuButton.MenuButtonUI.AddButton("chikin dayo", null, _GMPIcon); CustomUI.MenuButton.MenuButtonUI.AddButton("cececlown", null, _GMPIcon); CustomUI.MenuButton.MenuButtonUI.AddButton("desu", null, _GMPIcon); CustomUI.MenuButton.MenuButtonUI.AddButton("Smilew", null, _GMPIcon); CustomUI.MenuButton.MenuButtonUI.AddButton("hamnomanim", null, _GMPIcon); CustomUI.MenuButton.MenuButtonUI.AddButton("catgirls", null, _GMPIcon); CustomUI.MenuButton.MenuButtonUI.AddButton("mousegirl", null, _GMPIcon); CustomUI.MenuButton.MenuButtonUI.AddButton("miku", null, _GMPIcon); CustomUI.MenuButton.MenuButtonUI.AddButton("ohisee", null, _GMPIcon); } string disableScoreString = "<size=120%><color=#ff0000ff><b><u>Disables Score Submission</u> </b></color></size> \r\n<size=100%> "; //Rumble Option var gmpTweaksMenu = GameplaySettingsUI.CreateSubmenuOption(GameplaySettingsPanels.ModifiersRight, "GMP Tweaks", "MainMenu", "gmptweaksMenu", "GameplayModifiersPlus Tweaks", _GMPIcon); var rumbleOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersRight, "Controller Rumble", "MainMenu", "Toggle Controller Vibration in songs", _GMPIcon); rumbleOption.GetValue = ModPrefs.GetInt("GameplayModifiersPlus", "GameRumbleSetting", -1, false) != 1 ? false : true;; rumbleOption.OnToggle += (value) => { ModPrefs.SetInt("GameplayModifiersPlus", "GameRumbleSetting", value == true ? 1 : 0); Plugin.Log("Changed value"); }; var disableFireWorksOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersRight, "Disable Fireworks", "gmptweaksMenu", "Disable fireworks after a song", _GMPIcon); disableFireWorksOption.GetValue = ModPrefs.GetBool("GameplayModifiersPlus", "DisableFireworks", false, false); disableFireWorksOption.OnToggle += (value) => { disableFireworks = value; ModPrefs.SetBool("GameplayModifiersPlus", "DisableFireworks", value); Plugin.Log("Changed value"); }; var disableRippleOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersRight, "Disable Note Ripple", "gmptweaksMenu", "Disable ripple effect after cutting a note", _GMPIcon); disableRippleOption.GetValue = ModPrefs.GetBool("GameplayModifiersPlus", "DisableRipple", false, false); disableRippleOption.OnToggle += (value) => { disableRipple = value; ModPrefs.SetBool("GameplayModifiersPlus", "DisableRipple", value); Plugin.Log("Changed value"); }; var gmp1Menu = GameplaySettingsUI.CreateSubmenuOption(GameplaySettingsPanels.ModifiersRight, "GamePlayModifiersPlus", "MainMenu", "GMP1", "GameplayModifiersPlus Options", _GMPIcon); var disableScoresOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.PlayerSettingsLeft, "Disable Score Submission", "MainMenu", "<size=120%><color=#ff0000ff><b><u>Disables Score Submission</u></b></color></size>", _GMPIcon); disableScoresOption.GetValue = disableSubmission; disableScoresOption.OnToggle += (value) => { disableSubmission = value; if (value) { BS_Utils.Gameplay.ScoreSubmission.ProlongedDisableSubmission("Gameplay Modifiers Plus"); } else { BS_Utils.Gameplay.ScoreSubmission.RemoveProlongedDisable("Gameplay Modifiers Plus"); } }; //GMP1 Options // var backOption = GameplaySettingsUI.CreateSubmenuOption(GameplaySettingsPanels.ModifiersRight, "Back", "GMP1", "MainMenu", "Return from GamePlayModifiersOptions", _BackButton); if (Plugin.twitchPluginInstalled) { var twitchStuffOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersRight, "Chat Integration", "GMP1", disableScoreString + "Allows Chat to mess with your game if connected. !gm help", _TwitchIcon); twitchStuffOption.GetValue = chatIntegration; twitchStuffOption.OnToggle += (value) => { chatIntegration = value; Plugin.Log("Changed value"); }; var chatDeltaOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersRight, "Chat Delta", "GMP1", "Display Change in Performance Points / Rank in Twitch Chat if Connected", _ChatDeltaIcon); chatDeltaOption.GetValue = ModPrefs.GetBool("GameplayModifiersPlus", "chatDelta", false, true); chatDeltaOption.OnToggle += (chatDelta) => { ModPrefs.SetBool("GameplayModifiersPlus", "chatDelta", chatDelta); Plugin.Log("Changed value"); }; } //GMP2 Options var gmp2Menu = GameplaySettingsUI.CreateSubmenuOption(GameplaySettingsPanels.ModifiersRight, "Additional Modifiers", "GMP1", "GMP2", "Additional Modifiers", _GMPIcon); //Multiplayer Option toggle var multiOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersRight, "Allow in Multiplayer", "GMP1", "Allow GMP activation in multiplayer room if players equip similar version of the plugin, refer to the readme for more information. Your Version: " + Plugin.pluginVersion, _GMPIcon); multiOption.GetValue = ModPrefs.GetBool("GameplayModifiersPlus", "allowMulti", false, true); multiOption.OnToggle += (value) => { allowMulti = value; ModPrefs.SetBool("GameplayModifiersPlus", "allowMulti", value); Plugin.Log("Changed value"); }; var rainbowOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersRight, "Rainbow", "GMP2", "Rainbow Notes", _RainbowIcon); rainbowOption.GetValue = rainbow; rainbowOption.OnToggle += (value) => { rainbow = value; Plugin.Log("Changed value"); }; rainbowOption.AddConflict("Chat Integration"); var tunnelOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersRight, "Tunnel", "GMP2", "Play the song in a tunnel", _GMPIcon); tunnelOption.GetValue = tunnel; tunnelOption.OnToggle += (value) => { tunnel = value; Plugin.Log("Changed value"); }; var reverseOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersRight, "Reversal ", "GMP2", disableScoreString + "Reverses the direction the notes come from", _SwapSabersIcon); reverseOption.GetValue = reverse; reverseOption.OnToggle += (value) => { reverse = value; Plugin.Log("Changed value"); }; reverseOption.AddConflict("Chat Integration"); var repeatOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersRight, "Repeat", "GMP2", disableScoreString + "Restarts song on song end", _RepeatIcon); repeatOption.GetValue = repeatSong; repeatOption.OnToggle += (value) => { repeatSong = value; Plugin.Log("Changed value"); }; if (Plugin.mappingExtensionsPresent) { var sixlanesOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersRight, "Six Lanes", "GMP2", disableScoreString + "Extends the map to be in 6 lanes", _GMPIcon); sixlanesOption.GetValue = sixLanes; sixlanesOption.OnToggle += (value) => { sixLanes = value; Plugin.Log("Changed value"); }; var fourlayersOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersRight, "Four Layers", "GMP2", disableScoreString + "Extends the map to be in 4 vertical layers rather than 3", _GMPIcon); fourlayersOption.GetValue = fourLayers; fourlayersOption.OnToggle += (value) => { fourLayers = value; Plugin.Log("Changed value"); }; var fiveLanesOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersRight, "Five Lanes", "GMP2", disableScoreString + "Extends the map to be in 5 lanes", _GMPIcon); fiveLanesOption.GetValue = fiveLanes; fiveLanesOption.OnToggle += (value) => { fiveLanes = value; Plugin.Log("Changed value"); }; fiveLanesOption.AddConflict("Six Lanes"); var laneshiftOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersRight, "Lane Shift", "GMP2", disableScoreString + "Randomly shifts notes off of their normal lane", _GMPIcon); laneshiftOption.GetValue = laneShift; laneshiftOption.OnToggle += (value) => { laneShift = value; Plugin.Log("Changed value"); }; var angleShiftOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersRight, "Angle Shift", "GMP2", disableScoreString + "Randomly shifts notes off of their normal Angle", _GMPIcon); angleShiftOption.GetValue = angleShift; angleShiftOption.OnToggle += (value) => { angleShift = value; Plugin.Log("Changed value"); }; } var gnomeOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersRight, "Gnome on miss", "GMP2", "Probably try not to miss.", _GnomeIcon); gnomeOption.GetValue = gnomeOnMiss; gnomeOption.OnToggle += (value) => { gnomeOnMiss = value; Plugin.Log("Changed value"); }; gnomeOption.AddConflict("Chat Integration"); gnomeOption.AddConflict("Faster Song"); gnomeOption.AddConflict("Slower Song"); var bulletTimeOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersRight, "Bullet Time", "GMP2", disableScoreString + "Slow down time by pressing the triggers on your controllers.", _BulletTimeIcon); bulletTimeOption.GetValue = bulletTime; bulletTimeOption.OnToggle += (value) => { bulletTime = value; Plugin.Log("Changed value"); }; bulletTimeOption.AddConflict("Faster Song"); bulletTimeOption.AddConflict("Slower Song"); bulletTimeOption.AddConflict("Chat Integration"); var noteSizeOption = GameplaySettingsUI.CreateListOption(GameplaySettingsPanels.ModifiersRight, "Note Size", "GMP2", disableScoreString + "Change the size of the notes. Overwritten by Chat Integration and any other size changing options"); for (float i = 10; i <= 200; i += 10) { noteSizeOption.AddOption(i / 100); } noteSizeOption.GetValue = (() => { float num = fixedNoteScale; if (num % 0.1f != 0) { num = (float)Math.Round(num, 1); } num = Mathf.Clamp(num, 0.1f, 2f); return(num); }); noteSizeOption.OnChange += (value) => { fixedNoteScale = value; Plugin.Log("Changed Value"); }; var swapSabersOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersRight, "Testing Ground", "GMP2", disableScoreString + "Currently Used To test Random stuff"); swapSabersOption.GetValue = swapSabers; swapSabersOption.OnToggle += (value) => { swapSabers = value; Plugin.Log("Changed value"); }; swapSabersOption.AddConflict("Chat Integration"); var njsRandomOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersRight, "Random NJS", "GMP2", disableScoreString + "Randomizes Note Jump Speed", _RandomIcon); njsRandomOption.GetValue = njsRandom; njsRandomOption.OnToggle += (value) => { njsRandom = value; Plugin.Log("Changed value"); }; njsRandomOption.AddConflict("Chat Integration"); var offsetrandomOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersRight, "Random Spawn Offset", "GMP2", disableScoreString + "Randomizes Note Spawn offset", _RandomIcon); offsetrandomOption.GetValue = offsetrandom; offsetrandomOption.OnToggle += (value) => { offsetrandom = value; Plugin.Log("Changed value"); }; offsetrandomOption.AddConflict("Chat Integration"); var randomSizeOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersRight, "Random Note Size", "GMP2", disableScoreString + "Randomizes Note Size", _RandomIcon); randomSizeOption.GetValue = njsRandom; randomSizeOption.OnToggle += (value) => { randomSize = value; Plugin.Log("Changed value"); }; randomSizeOption.AddConflict("Chat Integration"); var funkyOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersRight, "Funky", "GMP2", disableScoreString + "Funky Notes", _FunkyIcon); funkyOption.GetValue = funky; funkyOption.OnToggle += (value) => { funky = value; Plugin.Log("Changed value"); }; funkyOption.AddConflict("Chat Integration"); var noArrowsOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersRight, "No Arrows", "GMP2", disableScoreString + "No arrows but without the color randomization", _NoArrowsIcon); noArrowsOption.GetValue = noArrows; noArrowsOption.OnToggle += (value) => { noArrows = value; Plugin.Log("Changed value"); }; noArrowsOption.AddConflict("Chat Integration"); var oneColorOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersRight, "One Color ", "GMP2", disableScoreString + "Changes Blocks to One Color, allows you to hit them with either saber. Haptics for saber clash and walls disabled with this modifier on", _GMPIcon); oneColorOption.GetValue = oneColor; oneColorOption.OnToggle += (value) => { oneColor = value; Plugin.Log("Changed value"); }; oneColorOption.AddConflict("Chat Integration"); var removeCrouchOption = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersRight, "Remove Crouch Walls ", "GMP2", disableScoreString + "Removes walls that require you to duck, leaving other walls in tact", _GMPIcon); removeCrouchOption.GetValue = removeCrouchWalls; removeCrouchOption.OnToggle += (value) => { removeCrouchWalls = value; Plugin.Log("Changed value"); }; }
private static void GameplaySettingsUISetup() { /* * MODIFIERS */ Sprite sprite = Base64Sprites.Base64ToSprite("iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAAA3WAAAN1gGQb3mcAAAAB3RJTUUH4wINFyAWrJdsNwAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4yMfEgaZUAAAKSSURBVEhL3dbLq05RHMbxEzEhuQ0OBi4DDDAxcSlDE1ISCgMGDAgTt8iACRMlyW0kKSZMKIRcBsQAfwGRiUK5RLm9vs9u/XbrXefZ+30z9KvP6V3Puuxz9nv2Wnug0+n8q4d4UGR9s2GffuBnkfXNhn36fy68Cd+xIcuc9/hQZCWtobU2Zlmlq5GswR/8QtvF5ySuTzRXa2it1SmrdTUyOxAX1y9S9o9FXFify/61iItqrbK/9TuOi99I7WFYj8f4jSh9foR10BiNvYXGi4oNMwswCRNwD1Gf8CTR56i70FjN0Vy3ZsWGhdF4AdUr6PsagegfCX0d6lM9xyjkawxhw8JZqLTgRLgxor74BU/BjanZMDMDela/YVrK2mi8Hh/NmZ4yy4aZPVCdget3zkG1C66/oh/jsRN7k92I5/MyVCvRNbHFKqguQe250Jqxvq41Th0HUFacOneqVqezCLFwLxqr0ly1dYqVtV8d+tc/jKPJEcSjcBWq5YiFe1kB1RWovRBaM9Y/hMFyUukgVMfh+p0TUOlOuv6KDTOzoR1Im8SUlLXRmM/QbjYzZZYNCxehuo984yipL3a3C3BjajYsaAt8CdVJuDESt1hjNceNqdkwo1sdJ9EXqNxppdNI9RXzoDmzUI6r2TCJ8/RaautkUr3GcMQ43eK3UMX5fR2t57kNkR/im1Mmz6BagsiWKqCeIrIt0NzGiw8JoGe26RCP7VC7UuxEel5V5SOXv0wsS1mtq5Fsgx4Hd4gfQ1NpEyrHaw2ttTXLKl2NzBiTyVTorz5fOI1BuDl2rSFBD/vQVNvh5lg2bLEYep+6XbiJ+XBzLBv2oBeCN/iYaMPQQePGNrJhD3rL0It81DtMhhvboDPwF6eIOFNA61CjAAAAAElFTkSuQmCC"); ToggleOption lightshowModifier = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.ModifiersLeft, "Lightshow Only", hintText: "Disables all notes and sabers, allowing you to view the lightshow!", optionIcon: sprite); lightshowModifier.GetValue = ChromaConfig.LightshowModifier; lightshowModifier.OnToggle += LightshowToggled; /* * COLOURS */ GameplaySettingsUI.CreateSubmenuOption(GameplaySettingsPanels.PlayerSettingsRight, "Chroma Colours", "MainMenu", "CTC", "Choose your Colour Scheme and more!"); ToggleOption technicolourToggle = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.PlayerSettingsRight, "Technicolour", "CTC", "Enable/Disable Technicolour. See Technicolour options below."); technicolourToggle.GetValue = ChromaConfig.TechnicolourEnabled; technicolourToggle.OnToggle += TechnicolourToggled; technicolourToggle.AddConflict("RNG PLights"); /* * EVENTS */ GameplaySettingsUI.CreateSubmenuOption(GameplaySettingsPanels.PlayerSettingsRight, "Chroma Events", "MainMenu", "CTE", "Toggle RGB lighting and special events"); ToggleOption rgbLightsToggle = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.PlayerSettingsRight, "RGB Lights", "CTE", "Enable/Disable RGB lighting events."); rgbLightsToggle.GetValue = ChromaConfig.CustomColourEventsEnabled; rgbLightsToggle.OnToggle += RGBEventsToggled; rgbLightsToggle.AddConflict("Darth Maul"); ToggleOption specialEventsToggle = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.PlayerSettingsRight, "Special Events", "CTE", "Enable/Disable Special Events, such as note size changing, player heal/harm events, and rotation events."); specialEventsToggle.GetValue = ChromaConfig.CustomSpecialEventsEnabled; specialEventsToggle.OnToggle += SpecialEventsToggled; specialEventsToggle.AddConflict("Darth Maul"); GameplaySettingsUI.CreateSubmenuOption(GameplaySettingsPanels.PlayerSettingsRight, "Techni. Options", "CTC", "CTT", "Adjust Technicolour Settings."); List <Tuple <float, string> > technicolourOptions = new List <Tuple <float, string> > { { 0f, "OFF" }, { 1f, "WARM/COLD" }, { 2f, "EITHER" }, { 3f, "TRUE RANDOM" } }; //float[] techniOptions = new float[technicolourOptions.Count]; //for (int i = 0; i < technicolourOptions.Count; i++) techniOptions[i] = i; MultiSelectOption techniLights = GameplaySettingsUI.CreateListOption(GameplaySettingsPanels.PlayerSettingsRight, "Tech. Lights", "CTT", "Technicolour style of the lights."); for (int i = 0; i < technicolourOptions.Count; i++) { techniLights.AddOption(i, technicolourOptions[i].Item2); } techniLights.GetValue += delegate { return((int)ChromaConfig.TechnicolourLightsStyle); }; techniLights.OnChange += delegate(float value) { ColourManager.TechnicolourStyle style = ColourManager.GetTechnicolourStyleFromFloat(value); ChromaConfig.TechnicolourLightsStyle = style; }; MultiSelectOption techniLightsGrouping = GameplaySettingsUI.CreateListOption(GameplaySettingsPanels.PlayerSettingsRight, "Lights Grouping", "CTT", ChromaConfig.WaiverRead ? "The more isolated, the more intense. Isolated Event has the best performance.\n <color=red>Mayhem prevents fades and flashes from working properly</color>." : "Isolated Event for better performance, but more chaotic lighting"); techniLightsGrouping.AddOption(0f, "Standard"); techniLightsGrouping.AddOption(1f, "Isolated Event"); if (ChromaConfig.WaiverRead) { techniLightsGrouping.AddOption(2f, "Isolated (Mayhem)"); } techniLightsGrouping.GetValue += delegate { return((int)ChromaConfig.TechnicolourLightsGrouping); }; techniLightsGrouping.OnChange += delegate(float value) { ChromaConfig.TechnicolourLightsGrouping = ColourManager.GetTechnicolourLightsGroupingFromFloat(value); }; MultiSelectOption techniFrequency = GameplaySettingsUI.CreateListOption(GameplaySettingsPanels.PlayerSettingsRight, "Lights Freq", "CTT", "The higher the frequency, the more colour changes. 10% is default."); for (int i = 1; i <= 20; i++) { techniFrequency.AddOption(0.05f * i, i == 2 ? "10% (Def)" : (5f * i) + "%"); } techniFrequency.GetValue += delegate { return(ChromaConfig.TechnicolourLightsFrequency); }; techniFrequency.OnChange += delegate(float value) { ChromaConfig.TechnicolourLightsFrequency = value; }; /*ToggleOption techniIndividualLights = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.PlayerSettingsRight, "Isolated Lights", "CTT", "If enabled, Technicolour will only affect one light source at a time. This results in much, much more colour variety being possible, but also can look excessively chaotic."); * techniIndividualLights.GetValue = ChromaConfig.TechnicolourLightsIndividual; * techniIndividualLights.OnToggle += delegate (bool value) { * ChromaConfig.TechnicolourLightsIndividual = value; * };*/ /*MultiSelectOption techniBarriers = GameplaySettingsUI.CreateListOption(GameplaySettingsPanels.PlayerSettingsRight, "Tech. Walls", "CTT", "Technicolour style of the walls/barriers."); * for (int i = 0; i < technicolourOptions.Count; i++) techniBarriers.AddOption(i, technicolourOptions[i].Item2); * techniBarriers.GetValue += delegate { * return (int)ChromaConfig.TechnicolourWallsStyle; * }; * techniBarriers.OnChange += delegate (float value) { * ColourManager.TechnicolourStyle style = ColourManager.GetTechnicolourStyleFromFloat(value); * ChromaConfig.TechnicolourWallsStyle = style; * };*/ //Walls don't need to have other options since they only work nicely with Either ToggleOption techniWalls = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.PlayerSettingsRight, "Tech. Barriers", "CTT", "If enabled, Barriers will rainbowify!"); techniWalls.GetValue = ChromaConfig.TechnicolourWallsStyle == ColourManager.TechnicolourStyle.ANY_PALETTE; techniWalls.OnToggle += delegate(bool value) { ChromaConfig.TechnicolourWallsStyle = value ? ColourManager.TechnicolourStyle.ANY_PALETTE : ColourManager.TechnicolourStyle.OFF; }; MultiSelectOption techniBlocks = GameplaySettingsUI.CreateListOption(GameplaySettingsPanels.PlayerSettingsRight, "Tech. Blocks", "CTT", "Technicolour style of the blocks."); for (int i = 0; i < technicolourOptions.Count; i++) { techniBlocks.AddOption(i, technicolourOptions[i].Item2); } techniBlocks.GetValue += delegate { return((int)ChromaConfig.TechnicolourBlocksStyle); }; techniBlocks.OnChange += delegate(float value) { ColourManager.TechnicolourStyle style = ColourManager.GetTechnicolourStyleFromFloat(value); ChromaConfig.TechnicolourBlocksStyle = style; }; MultiSelectOption techniSsabers = GameplaySettingsUI.CreateListOption(GameplaySettingsPanels.PlayerSettingsRight, "Tech. Sabers", "CTT", "Technicolour style of the sabers."); for (int i = 0; i < technicolourOptions.Count; i++) { techniSsabers.AddOption(i, technicolourOptions[i].Item2); } techniSsabers.GetValue += delegate { return((int)ChromaConfig.TechnicolourSabersStyle); }; techniSsabers.OnChange += delegate(float value) { ColourManager.TechnicolourStyle style = ColourManager.GetTechnicolourStyleFromFloat(value); ChromaConfig.TechnicolourSabersStyle = style; }; ToggleOption techniSabersMismatch = GameplaySettingsUI.CreateToggleOption(GameplaySettingsPanels.PlayerSettingsRight, "Desync Sabers", "CTT", "If true, technicolour sabers will have their \"time\" start and progress differently, resulting in their colours not matching so often."); techniSabersMismatch.GetValue = !ChromaConfig.MatchTechnicolourSabers; techniSabersMismatch.OnToggle += TechnicolourSaberMismatchToggled; GameplaySubMenuCreatedEvent?.Invoke("CTC"); GameplaySubMenuCreatedEvent?.Invoke("CTE"); GameplaySubMenuCreatedEvent?.Invoke("CTT"); ExtensionGameplayMenusEvent?.Invoke(); }