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");
        }
Exemple #2
0
        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();
        }
Exemple #3
0
 internal UIOption WithConflict(string name)
 {
     option.AddConflict(name);
     return(this);
 }