예제 #1
0
        private static InstructionalButton buttonCancelEvent = new InstructionalButton(Controls.TertiaryAction, Text.buttonCancelEvent); // Creating the Cancel Event button

        public Controller()
        {
            Tracks.AddTracks();           // Adding all tracks
            Collections.AddCollections(); // Adding all collections
            Intensities.AddIntensities(); // Adding all intensities

            controllerMenuPool = new MenuPool();
#if DLCPACK
            controllerMain = new UIMenu("", Text.controllerSubtitle);                   // With custom banner
#else
            controllerMain = new UIMenu(Text.controllerTitle, Text.controllerSubtitle); // Without custom banner
#endif
#if DEBUG
            testingMain = new UIMenu("Testing", "TESTING OPTIONS"); // #DEBUG
#endif

            controllerMain.AddItem(mainScoreCollection = new UIMenuListItem(Text.mainScoreCollectionTitle, Collections.scoreCollections, 0, Text.mainScoreCollectionDescr));
            controllerMain.AddItem(mainScoreTrack      = new UIMenuListItem(Text.mainScoreTrackTitle, Tracks.scoreLists[0], 0, Text.mainScoreTrackDescr));
            controllerMain.AddItem(mainScoreIntensity  = new UIMenuListItem(Text.mainScoreIntensityTitle, Intensities.listIntensities, 0, Text.mainScoreIntensityDescr));
            controllerMain.AddItem(mainMuteSound       = new UIMenuCheckboxItem(Text.mainMuteSoundTitle, false, Text.mainMuteSoundDescr));
            controllerMain.AddItem(mainMuteRadio       = new UIMenuCheckboxItem(Text.mainMuteRadioTitle, false, Text.mainMuteRadioDescr));
            controllerMain.AddItem(mainDisableWanted   = new UIMenuCheckboxItem(Text.mainDisableWantedTitle, false, Text.mainDisableWantedDescr));
            controllerMain.AddItem(mainDisableFlight   = new UIMenuCheckboxItem(Text.mainDisableFlightTitle, false, Text.mainDisableFlightDescr));
            controllerMain.AddItem(mainDisableOnDeath  = new UIMenuCheckboxItem(Text.mainDisableOnDeathTitle, true, Text.mainDisableOnDeathDescr));

#if DEBUG
            controllerMain.AddItem(mainCustomEvent = new UIMenuItem(Text.mainCustomEventTitle, Text.mainCustomEventDescr)); // #DEBUG
            // controllerMain.AddItem(mainCustomScene = new UIMenuItem(Text.mainCustomSceneTitle, Text.mainCustomSceneDescr)); #DEBUG
            controllerMain.AddItem(mainTesting = new UIMenuItem("Testing", "Testing stuff."));                              // #DEBUG

            testingMain.AddItem(testingFinaleTrack = new UIMenuItem("Trigger CH Finale Track", "Testing stuff."));          // #DEBUG
#endif

#if DLCPACK
            controllerMain.SetBannerType(bannerScoreController); // Adding the banner
#endif

            controllerMain.AddInstructionalButton(buttonStopScore);   // Adding the Stop Score button
#if DEBUG
            controllerMain.AddInstructionalButton(buttonCancelEvent); // Adding the Cancel event button #DEBUG
#endif

            controllerMenuPool.Add(controllerMain);
#if DEBUG
            controllerMenuPool.Add(testingMain); // #DEBUG
#endif

            Tick    += OnTick;
            KeyDown += OnKeyDown;
            controllerMain.OnIndexChange    += OnIndexChange;
            controllerMain.OnItemSelect     += OnItemSelect;
            controllerMain.OnListChange     += ListChangeHandler;
            controllerMain.OnCheckboxChange += OnCheckboxChange;
            WarningMessage.OnWarningMessage += OnWarningMessage;
            controllerMain.RefreshIndex();

#if DEBUG
            testingMain.OnItemSelect += OnItemSelect; // #DEBUG
#endif
        }
예제 #2
0
        static void SetInstensity() // Controlling the current track's intensity
        {
            if (currentScoreTrack.Stems == 1 || currentScoreTrack.Stems == 2)
            {
                return;
            }

            ScoreIntensity intensity = Intensities.FindIntensity(mainScoreIntensity.Items[mainScoreIntensity.Index].ToString());

            if (currentScoreTrack.Stems == 5) // Arena War
            {
                int index = Intensities.IntensitiesList.IndexOf(intensity);

                TriggerEvent(Intensities.EventsList5[index]);
            }

            if (currentScoreTrack.Stems == 6) // Assault, Smuggler, Biker
            {
                int index = Intensities.IntensitiesList.IndexOf(intensity);

                TriggerEvent(Intensities.EventsList6[index]);
            }

            if (currentScoreTrack.Stems == 7) // Woody Jackson's Sapstick
            {
                int index = Intensities.IntensitiesList.IndexOf(intensity);

                TriggerEvent(Intensities.EventsList7[index]);
            }

            if (currentScoreTrack.Stems == 8) // Doomsday
            {
                int index = Intensities.IntensitiesList.IndexOf(intensity);

                TriggerEvent(Intensities.EventsList8[index]);
            }

#if DEBUG
            UI.Notify("Intensity set for a track with " + currentScoreTrack.Stems.ToString() + " stems."); // #DEBUG
#endif
        }