Пример #1
0
        private void BuildMenu()
        {
            var item = new MenuItem {
                ItemText = "Song Volume", IsSelectable = false
            };

            item.AddOption("0%", "" + 0.0001);

            for (int x = 1; x < 11; x++)
            {
                item.AddOption(x + "0%", "" + x * 0.1);
            }
            _optionsMenu.AddItem(item);

            item = new MenuItem {
                ItemText = "Song Debugging", IsSelectable = false
            };
            item.AddOption("Off", false);
            item.AddOption("On", true);
            _optionsMenu.AddItem(item);


            item = new MenuItem {
                ItemText = "Song Audio Validation", IsSelectable = false
            };
            item.AddOption("Ignore", 0);
            item.AddOption("Warn only", 1);
            item.AddOption("Warn and exclude", 2);
            item.AddOption("Auto Correct", 3);

            _optionsMenu.AddItem(item);

            item = new MenuItem {
                ItemText = "Save Game Log", IsSelectable = false
            };
            item.AddOption("Off", false);
            item.AddOption("On", true);
            _optionsMenu.AddItem(item);

            item = new MenuItem {
                ItemText = "Logging Level", IsSelectable = false
            };
            item.AddOption("Errors only", LogLevel.ERROR);
            item.AddOption("Warnings and errors", LogLevel.WARN);
            item.AddOption("Notes or above", LogLevel.NOTE);
            item.AddOption("Info or above", LogLevel.INFO);
            item.AddOption("Debug or above", LogLevel.DEBUG);
            _optionsMenu.AddItem(item);

            item = new MenuItem {
                ItemText = "Theme", IsSelectable = false
            };
            foreach (string dir in System.IO.Directory.GetDirectories(Core.WgibeatRootFolder + "\\Content\\Textures"))
            {
                var dirname = dir.Substring(dir.LastIndexOf("\\") + 1);
                item.AddOption(dirname, dirname);
            }
            _optionsMenu.AddItem(item);

            item = new MenuItem {
                ItemText = "Allow Problematic Songs", IsSelectable = false
            };
            item.AddOption("Off", false);
            item.AddOption("On", true);
            _optionsMenu.AddItem(item);

            item = new MenuItem {
                ItemText = "Convert Files to .sng", IsSelectable = false
            };
            item.AddOption("Off", false);
            item.AddOption("On", true);
            _optionsMenu.AddItem(item);

            item = new MenuItem {
                ItemText = "Screen Resolution", IsSelectable = false
            };
            item.AddOption("640x480 (4:3)", "640x480");
            item.AddOption("800x600 (4:3)", "800x600");
            item.AddOption("1024x768 (4:3)", "1024x768");
            item.AddOption("1280x1024 (4:3)", "1280x1024");

            item.AddOption("1280x720 (16:9)", "1280x720");
            item.AddOption("1600x900 (16:9)", "1600x900");
            item.AddOption("1920x1080 (16:9)", "1920x1080");
            _optionsMenu.AddItem(item);

            item = new MenuItem {
                ItemText = "Full screen", IsSelectable = false
            };
            item.AddOption("Off", false);
            item.AddOption("On", true);
            _optionsMenu.AddItem(item);

            item = new MenuItem {
                ItemText = "V-Sync", IsSelectable = false
            };
            item.AddOption("Off", false);
            item.AddOption("On", true);
            _optionsMenu.AddItem(item);

            item = new MenuItem {
                ItemText = "Check For Updates", IsSelectable = false
            };
            item.AddOption("Off", false);
            item.AddOption("On", true);
            _optionsMenu.AddItem(item);

            item = new MenuItem {
                ItemText = "Background Animation", IsSelectable = false
            };
            item.AddOption("Off", 0);
            item.AddOption("Normal", 128);
            item.AddOption("ARGH! MY EYES!", 255);

            _optionsMenu.AddItem(item);

            item = new MenuItem {
                ItemText = "Blazing Bass Boost", IsSelectable = false
            };
            item.AddOption("Off", 1);
            item.AddOption("Light", 1.25);
            item.AddOption("Mild", 1.5);
            item.AddOption("Max", 2);
            _optionsMenu.AddItem(item);

            item = new MenuItem {
                ItemText = "Save"
            };
            _optionsMenu.AddItem(item);
            item = new MenuItem {
                ItemText = "Cancel", IsCancel = true
            };
            _optionsMenu.AddItem(item);
        }
Пример #2
0
        private void CreatePlayerMenu(int x)
        {
            _playerMenus[x] = new Menu
            {
                Width                       = Core.Metrics["NewGameMenu.Size", 0].X,
                Position                    = (Core.Metrics["NewGameMenuStart", x]),
                MaxVisibleItems             = (int)Core.Metrics["NewGameMenu.Size", 0].Y,
                SelectedItemBackgroundColor = _backgroundColors[x]
            };
            _playerMenus[x].AddItem(new MenuItem {
                ItemText = "Decision"
            });
            _playerMenus[x].AddItem(new MenuItem {
                ItemText = "Profile"
            });

            var difficulty = new MenuItem {
                ItemText = "Difficulty", IsSelectable = false
            };

            difficulty.AddOption("Beginner", 0);
            difficulty.AddOption("Easy", 1);
            difficulty.AddOption("Medium", 2);
            difficulty.AddOption("Hard", 3);


            if (Core.Players[x].GetMaxDifficulty() >= 4)
            {
                difficulty.AddOption("Insane", 4);
            }
            if (Core.Players[x].GetMaxDifficulty() >= 5)
            {
                difficulty.AddOption("Ruthless", 5);
            }
            _playerMenus[x].AddItem(difficulty);

            var noteSpeed = new MenuItem {
                ItemText = "Beatline Speed", IsSelectable = false
            };

            noteSpeed.AddOption("0.5x", 0.5);
            noteSpeed.AddOption("1x", 1.0);
            noteSpeed.AddOption("1.5x", 1.5);
            noteSpeed.AddOption("2x", 2.0);
            noteSpeed.AddOption("3x", 3.0);
            noteSpeed.AddOption("4x", 4.0);
            noteSpeed.AddOption("6x", 6.0);
            noteSpeed.SetSelectedByValue(1.0);
            _playerMenus[x].AddItem(noteSpeed);

            var disableKO = new MenuItem {
                ItemText = "Disable KO", IsSelectable = false
            };

            disableKO.AddOption("Off", false);
            disableKO.AddOption("On", true);
            _playerMenus[x].AddItem(disableKO);

            var disableLb = new MenuItem {
                ItemText = "Disable Extra Life", IsSelectable = false
            };

            disableLb.AddOption("Off", false);
            disableLb.AddOption("On", true);

            _playerMenus[x].AddItem(disableLb);

            _playerMenus[x].AddItem(new MenuItem {
                ItemText = "Leave", IsCancel = true
            });
        }