private void CreateSettingsMenu() { var settingsMenu = new MenuTree("menu.mod.heat", "Heat Display Settings") { new InputPrompt(MenuDisplayMode.Both, "setting:toggle_hotkey", "SET TOGGLE HOTKEY") .WithTitle("SET TOGGLE HOTKEY") .WithDefaultValue(() => Config.ToggleHotkey) .WithSubmitAction(x => Config.ToggleHotkey = x), new ListBox <DisplayMode>(MenuDisplayMode.Both, "setting:display_mode", "DISPLAY MODE") .WithEntries(MapEnumToListBox <DisplayMode>()) .WithGetter(() => Config.DisplayMode) .WithSetter((x) => Config.DisplayMode = x), new ListBox <ActivationMode>(MenuDisplayMode.Both, "setting:activation_mode", "ACTIVATION MODE") .WithEntries(MapEnumToListBox <ActivationMode>()) .WithGetter(() => Config.ActivationMode) .WithSetter((x) => Config.ActivationMode = x), new FloatSlider(MenuDisplayMode.Both, "setting:warning_threshold", "WARNING THRESHOLD") .LimitedByRange(0.0f, 1.0f) .WithGetter(() => Config.WarningTreshold) .WithSetter((x) => Config.WarningTreshold = x) }; Menus.AddNew(MenuDisplayMode.Both, settingsMenu, "HEAT DISPLAY", "Configure the Heat mod."); }
private void CreateSettingsMenu() { MenuTree settingsMenu = new MenuTree("menu.mod.scenedumper", "Scene Dumper Settings") { new InputPrompt(MenuDisplayMode.Both, "setting:keybind_dumper_basic", "BASIC DUMP KEY BIND") .WithDefaultValue(() => Config.DumpSceneBasic) .WithSubmitAction((x) => Config.DumpSceneBasic = x) .WithTitle("ENTER KEY BINDING") .WithDescription("Set the keyboard shortcut used to make a basic dump."), new InputPrompt(MenuDisplayMode.Both, "setting:keybind_dumper_detailed", "DETAILED DUMP KEY BIND") .WithDefaultValue(() => Config.DumpSceneDetailed) .WithSubmitAction((x) => Config.DumpSceneDetailed = x) .WithTitle("ENTER KEY BINDING") .WithDescription("Set the keyboard shortcut used to make a detailed dump."), new ActionButton(MenuDisplayMode.Both, "setting:open_dumps_folder", "OPEN DUMPS FOLDER") .WhenClicked(() => { DirectoryInfo data = new DirectoryInfo(FileSystem.VirtualFileSystemRoot); if (!data.Exists) { data.Create(); } Process.Start(new ProcessStartInfo(data.FullName)); }) .WithDescription("Opens the folder containing dump logs.") }; Menus.AddNew(MenuDisplayMode.Both, settingsMenu, "SCENE DUMPER", "Settings for the Scene Dumper mod."); }
private void CreateSettingsMenu() { MenuTree settingsMenu = new MenuTree("menu.mod.trackmusic", "Track Music Settings") { new IntegerSlider(MenuDisplayMode.Both, "setting:max_music_download_size", "MAXIMUM DOWNLOAD SIZE (MB)") .WithGetter(() => (int)Config.MaxMusicDownloadSizeMB) .WithSetter((x) => Config.MaxMusicDownloadSizeMB = x) .LimitedByRange(10, 150) .WithDefaultValue(30) .WithDescription("Set the maximum file size to download for online music downloading."), new IntegerSlider(MenuDisplayMode.Both, "setting:max_music_download_time", "MAXIMUM DOWNLOAD TIME (SECS)") .WithGetter(() => (int)Config.MaxMusicDownloadTimeSeconds) .WithSetter((x) => Config.MaxMusicDownloadTimeSeconds = x) .LimitedByRange(5, 60) .WithDefaultValue(15) .WithDescription("Set the amount of time after which the music download times out (gets canceled)."), new IntegerSlider(MenuDisplayMode.Both, "setting:max_level_load_time", "MAXIMUM LOAD TIME (SECS)") .WithGetter(() => (int)Config.MaxMusicLevelLoadTimeSeconds) .WithSetter((x) => Config.MaxMusicLevelLoadTimeSeconds = x) .LimitedByRange(5, 60) .WithDefaultValue(20) .WithDescription("Set the amount of time after which the level loads whether the music download is complete or not."), }; Menus.AddNew(MenuDisplayMode.Both, settingsMenu, "TRACK MUSIC", "Settings for the Track Music mod."); }
private void CreateSettingsMenu() { MenuTree settingsMenu = new MenuTree("menu.mod.customcar", "Custom Cars Settings") { new CheckBox(MenuDisplayMode.Both, "setting:use_trumpet_horn", "USE TRUMPET HORN") .WithGetter(() => Config.UseTrumpetHorn) .WithSetter((x) => Config.UseTrumpetHorn = x) .WithDescription("Custom car models will use the encryptor horn (the \"doot\" trumpet).") }; Menus.AddNew(MenuDisplayMode.Both, settingsMenu, "CUSTOM CARS", "Settings for the Custom Cars mod."); }
private void CreateSettingsMenu() { MenuTree settingsMenu = new MenuTree("menu.mod.customwheelhologram", "Wheel Hologram Settings") { new ActionButton(MenuDisplayMode.Both, "setting:select_image", "SELECT IMAGE") .WhenClicked(() => { var dlgOpen = new System.Windows.Forms.OpenFileDialog { Filter = "Image file (*.png, *.jpg, *.jpeg *.bmp)|*.png;*.jpg;*.jpeg;*.bmp|All Files (*.*)|*.*", SupportMultiDottedExtensions = true, RestoreDirectory = true, Title = "Select an image file", CheckFileExists = true, CheckPathExists = true }; if (dlgOpen.ShowDialog() == System.Windows.Forms.DialogResult.OK) { FileInfo image = new FileInfo(dlgOpen.FileName); if (image.Exists) { Config.FileName = Path.GetFileName(image.CopyTo(Path.Combine(FileSystem.VirtualFileSystemRoot, Path.GetFileName(image.FullName)), true).FullName); Config.Enabled = true; } } }) .WithDescription("Select the image file displayed on the wheel hologram."), new ActionButton(MenuDisplayMode.Both, "setting:reset_image", "RESET IMAGE") .WhenClicked(() => { MessageBox.Create("Are you sure you want to reset the hologram to its default image?", "RESET WHEEL IMAGE") .SetButtons(MessageButtons.YesNo) .OnConfirm(() => { Config.Enabled = false; Config.FileName = string.Empty; if (WheelImage.Exists) { WheelImage.Delete(); } }) .Show(); }) .WithDescription("Resets the wheel hologram to the game's default.") }; Menus.AddNew(MenuDisplayMode.Both, settingsMenu, "CUSTOM WHEEL HOLOGRAM", "Change settings of the Custom Wheel Hologram mod and customize your vehicle's wheel image (works only with vanilla cars)."); }
public void CreateMenus() { MenuTree menu = new MenuTree("texturemodifier#main.menu", "Texture Modifier"); menu.ActionButton( MenuDisplayMode.Both, "texturemodifier#main.menu/datafolder-open", "OPEN DATA FOLDER", () => { Process.Start(Path.Combine(Data.RootDirectory, "Data")); }, "Open the folder used to load textures." ); Menus.AddNew(MenuDisplayMode.Both, menu, "Settings for the Texture Modifier mod"); }
public void CreateSettingsMenu() { MenuTree features = new MenuTree("christmasfeatures#features", "FEATURES SELECTION") { new CheckBox(MenuDisplayMode.Both, "setting:override_loading_screens", "MODIFY LOADING SCREEN BACKGROUNDS") .WithGetter(() => Config.OverrideLoadingScreens) .WithSetter((x) => Config.OverrideLoadingScreens = x) .WithDescription($"{InternalResources.Constants.CHEAT_VISUAL}: Display Christmas themed loading screens.\n(does not apply for [u]Lost to Echoes[/u] loading screens)"), new CheckBox(MenuDisplayMode.Both, "setting:cosmetic_screen_snow", "DECORATIVE SNOW") .WithGetter(() => Config.ChristmasSnowVisualCheat) .WithSetter((x) => Config.ChristmasSnowVisualCheat = x) .WithDescription($"{InternalResources.Constants.CHEAT_VISUAL}: Display snow on the car screen.\n(only applies for vehicles having a screen on them)"), new CheckBox(MenuDisplayMode.Both, "setting:cosmetic_reindeer_hat", "DECORATIVE REINDEER HAT") .WithGetter(() => Config.ReindeerCosmeticVisualCheat) .WithSetter((x) => Config.ReindeerCosmeticVisualCheat = x) .WithDescription($"{InternalResources.Constants.CHEAT_VISUAL}: Add a cosmetic reindeer hat to the car.\n(may not apply on all cars)") }; MenuTree menu = new MenuTree("christmasfeatures#main.menu", "CHRISTMAS FEATURES") { new ListBox <ActivationMode>(MenuDisplayMode.Both, "setting:activation_mode", "ACTIVATION MODE") .WithGetter(() => Config.ActivationMode) .WithSetter((x) => Config.ActivationMode = x) .WithEntries(new Dictionary <string, ActivationMode>() { { "Always", ActivationMode.Always }, { "During December", ActivationMode.DuringDecember }, { "Always Except December", ActivationMode.AlwaysExceptDecember }, { "First 25 Days Of December", ActivationMode.First25DaysOfDecember }, { "Only On Christmas", ActivationMode.OnlyOnDecember24And25 }, { "During Christmas Week", ActivationMode.DuringWeekOfChristmas }, { "Never", ActivationMode.Never } }) .WithDescription("Select when the mod should be enabled."), new ListBox <TimeFormat>(MenuDisplayMode.Both, "setting:time_format", "TIME ZONE FORMAT") .WithGetter(() => Config.TimeFormat) .WithSetter((x) => Config.TimeFormat = x) .WithEntries(MapEnumToListBox <TimeFormat>()) .WithDescription("Select between local or UTC time zone.\nThis setting is used in date calculations for some activation modes."), new SubMenu(MenuDisplayMode.Both, "menu:features", "SELECT FEATURES") .NavigatesTo(features) .WithDescription("Select which features are active when the mod is enabled.") }; Menus.AddNew(MenuDisplayMode.Both, menu, "Settings for the Christmas Seasonal Features mod"); }
public void CreateSettingsMenu() { // TODO: Update readme instructions MenuTree settingsMenu = new MenuTree("menu.mod.menuutilities", "Menu Settings") { new CheckBox(MenuDisplayMode.Both, "setting:enable_delete_playlist", "SHOW LEVEL PLAYLIST REMOVE BUTTON") .WithGetter(() => Config.EnableDeletePlaylistButton) .WithSetter((x) => Config.EnableDeletePlaylistButton = x) .WithDescription("Display a button to delete playlists in the level grid menu."), new CheckBox(MenuDisplayMode.Both, "setting:enable_car_hex_input", "SHOW HEXADECIMAL CAR COLOR INPUT") .WithGetter(() => Config.EnableHexColorInput) .WithSetter((x) => Config.EnableHexColorInput = x) .WithDescription("Display a button to modify the hexadecimal color value as text in the car customization menu."), }; Menus.AddNew(MenuDisplayMode.Both, settingsMenu, "MENU UTILITIES", "Settings for the Menu Utilities mod."); }
private void CreateSettingsMenu() { MenuTree settingsMenu = new MenuTree("menu.mod.anolytics", "Anolytics Settings") { new CheckBox(MenuDisplayMode.Both, "setting:shutdown_analytics", "DISABLE ANALYTICS") .WithGetter(() => Config.ShutDownAnalytics) .WithSetter((x) => Config.ShutDownAnalytics = x) .WithDescription("Disables connection with Google analytics services.\n(Avoids requests to \"https://www.google-analytics.com/__utm.gif?\")"), new CheckBox(MenuDisplayMode.Both, "setting:log_analytics", "LOG ANALYTICS ACTIVITY") .WithGetter(() => Config.LogAnalytics) .WithSetter((x) => Config.LogAnalytics = x) .WithDescription("Outputs analytics events to the console."), new CheckBox(MenuDisplayMode.Both, "setting:disable_playtest_logging", "DISABLE PLAYTESTING LOG FILE") .WithGetter(() => Config.DisablePlaytestingDataLogging) .WithSetter((x) => Config.DisablePlaytestingDataLogging = x) .WithDescription("Blocks file write attempts to \"playtesting_data.txt\"."), new ActionButton(MenuDisplayMode.Both, "setting:delete_playtest_log", "DELETE PLAYTEST LOG FILE") .WhenClicked(() => { MessageBox.Create("Are you sure you want to delete \"playtesting_data.txt\" ?", "REMOVE FILE") .SetButtons(MessageButtons.YesNo) .OnConfirm(() => { FileInfo file = new FileInfo(Path.Combine(Application.dataPath, "playtesting_data.txt")); if (file.Exists) { file.Delete(); } }) .Show(); }) .WithDescription("Removes the playtesting log file from the disk.") }; Menus.AddNew(MenuDisplayMode.Both, settingsMenu, "ANOLYTICS", "Change settings of the Anolytics mod."); }
public void CreateSettingsMenu() { MenuTree settingsMenu; if (!DevMode) { settingsMenu = new MenuTree("menu.mod.editoradditions", "Editor Additions Settings") { new CheckBox(MenuDisplayMode.MainMenu, "setting:show_dev_folder", "ENABLE DEV OBJECTS FOLDER") .WithGetter(() => Config.DevFolderEnabled) .WithSetter((x) => Config.DevFolderEnabled = x) .WithDescription("Enables the Dev folder in the level editor Library tab.\nSome of the objects in this folder might not work properly, be careful when using them!"), new CheckBox(MenuDisplayMode.MainMenu, "setting:advanced_music_selection", "ADVANCED MUSIC SELECTION") .WithGetter(() => Config.AdvancedMusicSelection) .WithSetter((x) => Config.AdvancedMusicSelection = x) .WithDescription("Display hidden dev music cues in the level editor music selector window."), new CheckBox(MenuDisplayMode.MainMenu, "setting:display_workshop_levels", "LIST WORKSHOP LEVELS") .WithGetter(() => Config.DisplayWorkshopLevels) .WithSetter((x) => Config.DisplayWorkshopLevels = x) .WithDescription("Allows to open the workshop levels from the level editor (read only)."), new ActionButton(MenuDisplayMode.Both, "info:devmode", "DEV MODE".Colorize(Colors.tan)) .WhenClicked(() => { }) .WithDescription("Start the game with the \"-dev\" console argument to enable dev mode.\nThis will override the previous settings to be enabled, however there is no guarantee it won't have other side effects.") }; } else { settingsMenu = new MenuTree("menu.mod.editoradditions", "Editor Additions Settings") { new ActionButton(MenuDisplayMode.Both, "info:devmode-enabled", "DEV MODE ENABLED".Colorize(Colors.cadetBlue)) .WhenClicked(() => { }) .WithDescription("To disable, remove the \"-dev\" command line argument from the game launch options.") }; } Menus.AddNew(MenuDisplayMode.Both, settingsMenu, "EDITOR ADDITIONS", "Settings for the EditorAdditions mod."); }
private void CreateSettingsMenu() { MenuTree settingsMenu = new MenuTree("menu.mod.noserverlimit", "No Server Limit Settings") { new InputPrompt(MenuDisplayMode.MainMenu, "setting:set_server_limit", "SET MAXIMUM SERVER SLOT COUNT") .WithDefaultValue(() => Config.MaxPlayerCount.ToString()) .WithSubmitAction((x) => { if (int.TryParse(x, out int result)) { Config.MaxPlayerCount = Math.Max(2, result); } else { Logger.Warning("Failed to parse user input. Setting defaults."); Config.MaxPlayerCount = 32; } }) .WithTitle("ENTER SLOT COUNT") .WithDescription("Set the maximum supported slot count when hosting a multiplayer server.") }; Menus.AddNew(MenuDisplayMode.Both, settingsMenu, "NO SERVER LIMIT", "Settings for the No Server Limit mod."); } }
public void CreateSettingsMenu() { Menus.AddNew(MenuDisplayMode.Both, new MenuTree("menu.r&d.main", "Research and Development Test Mod") { new ActionButton(MenuDisplayMode.Both, "gc_collect", "System.GC.Collect()") .WhenClicked(() => GC.Collect()) .WithDescription("Forces immediate garbage collection by the .Net runtime"), new ActionButton(MenuDisplayMode.Both, "resources_unload", "UnityEngine.Resources.UnloadUnusedAssets()") .WhenClicked(() => Resources.UnloadUnusedAssets()) .WithDescription("Forces the Unity engine to unload any asset that is loaded and unused at the moment"), new ActionButton(MenuDisplayMode.Both, "print_alloc", "System.GC.GetTotalMemory(false)") .WhenClicked(() => MessageBox.Create(GC.GetTotalMemory(false).ToString(), "").SetButtons(MessageButtons.Ok).Show()) .WithDescription("Print the number of bytes of managed memory allocated to the .Net runtime (for this process only)") }); /* * MenuTree advancedDisplayMenu = new MenuTree("menu.mod.nitronichud#interface.advanced", "Advanced Interface Options") * { * new FloatSlider(MenuDisplayMode.Both, "setting:heat_blink_start_amount", "HEAT BLINK START AMOUNT") * .LimitedByRange(0.0f, 1.0f) * .WithDefaultValue(0.7f) * .WithGetter(() => Config.HeatBlinkStartAmount) * .WithSetter(x => Config.HeatBlinkStartAmount = x) * .WithDescription("Set the heat treshold after which the hud starts to blink."), * * new FloatSlider(MenuDisplayMode.Both, "setting:heat_blink_frequence", "HEAT BLINK FREQUENCE") * .LimitedByRange(0.0f, 10.0f) * .WithDefaultValue(2.0f) * .WithGetter(() => Config.HeatBlinkFrequence) * .WithSetter(x => Config.HeatBlinkFrequence = x) * .WithDescription("Set the hud blink rate (per second)."), * * new FloatSlider(MenuDisplayMode.Both, "setting:heat_blink_frequence_boost", "HEAT BLINK FREQUENCE BOOST") * .LimitedByRange(0.0f, 10.0f) * .WithDefaultValue(1.15f) * .WithGetter(() => Config.HeatBlinkFrequenceBoost) * .WithSetter(x => Config.HeatBlinkFrequenceBoost = x) * .WithDescription("Sets the blink rate boost.\nThe blink rate at 100% heat is the blink rate times this value (set this to 1 to keep the rate constant)."), * * new FloatSlider(MenuDisplayMode.Both, "setting:heat_blink_amount", "HEAT BLINK AMOUNT") * .LimitedByRange(0.0f, 1.0f) * .WithDefaultValue(0.7f) * .WithGetter(() => Config.HeatBlinkAmount) * .WithSetter(x => Config.HeatBlinkAmount = x) * .WithDescription("Sets the color intensity of the overheat blink animation (lower values means smaller color changes)."), * * new FloatSlider(MenuDisplayMode.Both, "setting:heat_flame_amount", "HEAT FLAME AMOUNT") * .WithDefaultValue(0.5f) * .LimitedByRange(0.0f, 1.0f) * .WithGetter(() => Config.HeatFlameAmount) * .WithSetter(x => Config.HeatFlameAmount = x) * .WithDescription("Sets the color intensity of the overheat flame animation (lower values means smaller color changes).") * }; * * MenuTree displayMenu = new MenuTree("menu.mod.nitronichud#interface", "Interface Options") * { * new CheckBox(MenuDisplayMode.Both, "setting:display_countdown", "SHOW COUNTDOWN") * .WithGetter(() => Config.DisplayCountdown) * .WithSetter(x => Config.DisplayCountdown = x) * .WithDescription("Displays the 3... 2... 1... RUSH countdown when playing a level."), * * new CheckBox(MenuDisplayMode.Both, "setting:display_overheat", "SHOW OVERHEAT METERS") * .WithGetter(() => Config.DisplayHeatMeters) * .WithSetter(x => Config.DisplayHeatMeters = x) * .WithDescription("Displays overheat indicator bars in the lower screen corners."), * * new CheckBox(MenuDisplayMode.Both, "setting:display_timer", "SHOW TIMER") * .WithGetter(() => Config.DisplayTimer) * .WithSetter(x => Config.DisplayTimer = x) * .WithDescription("Displays the timer at the bottom of the screen."), * * new IntegerSlider(MenuDisplayMode.Both, "setting:overheat_scale", "OVERHEAT SCALE") * .WithDefaultValue(20) * .WithGetter(() => Mathf.RoundToInt(Config.HeatMetersScale * 20.0f)) * .WithSetter(x => Config.HeatMetersScale = x / 20.0f) * .LimitedByRange(1, 50) * .WithDescription("Set the size of the overheat bars."), * * new IntegerSlider(MenuDisplayMode.Both, "setting:overheat_horizontal_offset", "OVERHEAT HORIZONTAL POSITION") * .WithDefaultValue(0) * .WithGetter(() => Config.HeatMetersHorizontalOffset) * .WithSetter(x => Config.HeatMetersHorizontalOffset = x) * .LimitedByRange(-200, 200) * .WithDescription("Set the horizontal position offset of the overheat bars."), * * new IntegerSlider(MenuDisplayMode.Both, "setting:overheat_vertical_offset", "OVERHEAT VERTICAL POSITION") * .WithDefaultValue(0) * .WithGetter(() => Config.HeatMetersVerticalOffset) * .WithSetter(x => Config.HeatMetersVerticalOffset = x) * .LimitedByRange(-100, 100) * .WithDescription("Set the vertical position offset of the overheat bars."), * * new IntegerSlider(MenuDisplayMode.Both, "setting:timer_scale", "TIMER SCALE") * .WithDefaultValue(20) * .WithGetter(() => Mathf.RoundToInt(Config.TimerScale * 20.0f)) * .WithSetter(x => Config.TimerScale = x / 20.0f) * .LimitedByRange(1, 50) * .WithDescription("Set the size of the timer."), * * new IntegerSlider(MenuDisplayMode.Both, "setting:timer_vertical_offset", "TIMER VERTICAL OFFSET") * .WithDefaultValue(0) * .WithGetter(() => Config.TimerVerticalOffset) * .WithSetter(x => Config.TimerVerticalOffset = x) * .LimitedByRange(-100, 100) * .WithDescription("Set the vertical position of the timer."), * * new SubMenu(MenuDisplayMode.Both, "menu:interface.advanced", "ADVANCED SETTINGS") * .NavigatesTo(advancedDisplayMenu) * .WithDescription("Configure advanced settings for the hud."), * * new ActionButton(MenuDisplayMode.Both, "action:preview_hud", "PREVIEW HUD") * .WhenClicked(() => VisualDisplay.ForceDisplay = !VisualDisplay.ForceDisplay) * .WithDescription("Show the hud to preview changes.") * }; * * MenuTree audioMenu = new MenuTree("menu.mod.nitronichud#audio", "Audio Options"); * * MenuTree settingsMenu = new MenuTree("menu.mod.nitronichud", "Nitronic HUD Settings"); * * settingsMenu.Add( * new SubMenu(MenuDisplayMode.Both, "menu:interface", "DISPLAY") * .NavigatesTo(displayMenu) * .WithDescription("Configure settings for the visual interface.")); * * if (Application.platform != RuntimePlatform.LinuxPlayer) * { * settingsMenu.Add( * new SubMenu(MenuDisplayMode.Both, "menu:interface", "AUDIO".Colorize(Colors.gray)) * .NavigatesTo(audioMenu) * .WithDescription("Configure audio settings for the countdown announcer.")); * } * * settingsMenu.Add( * new ActionButton(MenuDisplayMode.MainMenu, "menu:interface", "PREVIEW SETTINGS".Colorize(Colors.gray)) * .WhenClicked(() => * { * MessageBox.Create("This feature isn't implemented yet but will be in a future release.", "ERROR") * .SetButtons(MessageButtons.Ok) * .Show(); * }) * .WithDescription("Start the animation sequence thet plays when a level starts to preview the settings.")); * * //Menus.AddNew(MenuDisplayMode.Both, settingsMenu, "NITRONIC HUD [1E90FF](BETA)[-]", "Settings for the Nitronic HUD mod."); * Menus.AddNew(MenuDisplayMode.Both, settingsMenu, "NITRONIC HUD [FFBF1E](RELEASE CANDIDATE)[-]", "Settings for the Nitronic HUD mod."); */ }
public void CreateSettingsMenu() { MenuTree menu = new MenuTree("halloweenfeatures#main.menu", "HALLOWEEN FEATURES"); Menus.AddNew(MenuDisplayMode.Both, menu, "Settings for the Halloween Seasonal Features mod"); }
public void CreateSettingsMenu() { // TODO: Write menu docs in instructions.html MenuTree advancedDisplayMenu = new MenuTree("menu.mod.nitronichud#interface.advanced", "Advanced Interface Options") { new FloatSlider(MenuDisplayMode.Both, "setting:heat_blink_start_amount", "HEAT BLINK START AMOUNT") .LimitedByRange(0.0f, 1.0f) .WithDefaultValue(0.7f) .WithGetter(() => Config.HeatBlinkStartAmount) .WithSetter(x => Config.HeatBlinkStartAmount = x) .WithDescription("Set the heat treshold after which the hud starts to blink."), new FloatSlider(MenuDisplayMode.Both, "setting:heat_blink_frequence", "HEAT BLINK FREQUENCE") .LimitedByRange(0.0f, 10.0f) .WithDefaultValue(2.0f) .WithGetter(() => Config.HeatBlinkFrequence) .WithSetter(x => Config.HeatBlinkFrequence = x) .WithDescription("Set the hud blink rate (per second)."), new FloatSlider(MenuDisplayMode.Both, "setting:heat_blink_frequence_boost", "HEAT BLINK FREQUENCE BOOST") .LimitedByRange(0.0f, 10.0f) .WithDefaultValue(1.15f) .WithGetter(() => Config.HeatBlinkFrequenceBoost) .WithSetter(x => Config.HeatBlinkFrequenceBoost = x) .WithDescription("Sets the blink rate boost.\nThe blink rate at 100% heat is the blink rate times this value (set this to 1 to keep the rate constant)."), new FloatSlider(MenuDisplayMode.Both, "setting:heat_blink_amount", "HEAT BLINK AMOUNT") .LimitedByRange(0.0f, 1.0f) .WithDefaultValue(0.7f) .WithGetter(() => Config.HeatBlinkAmount) .WithSetter(x => Config.HeatBlinkAmount = x) .WithDescription("Sets the color intensity of the overheat blink animation (lower values means smaller color changes)."), new FloatSlider(MenuDisplayMode.Both, "setting:heat_flame_amount", "HEAT FLAME AMOUNT") .WithDefaultValue(0.5f) .LimitedByRange(0.0f, 1.0f) .WithGetter(() => Config.HeatFlameAmount) .WithSetter(x => Config.HeatFlameAmount = x) .WithDescription("Sets the color intensity of the overheat flame animation (lower values means smaller color changes).") }; MenuTree displayMenu = new MenuTree("menu.mod.nitronichud#interface", "Interface Options") { new CheckBox(MenuDisplayMode.Both, "setting:display_countdown", "SHOW COUNTDOWN") .WithGetter(() => Config.DisplayCountdown) .WithSetter(x => Config.DisplayCountdown = x) .WithDescription("Displays the 3... 2... 1... RUSH countdown when playing a level."), new CheckBox(MenuDisplayMode.Both, "setting:display_overheat", "SHOW OVERHEAT METERS") .WithGetter(() => Config.DisplayHeatMeters) .WithSetter(x => Config.DisplayHeatMeters = x) .WithDescription("Displays overheat indicator bars in the lower screen corners."), new CheckBox(MenuDisplayMode.Both, "setting:display_timer", "SHOW TIMER") .WithGetter(() => Config.DisplayTimer) .WithSetter(x => Config.DisplayTimer = x) .WithDescription("Displays the timer at the bottom of the screen."), new IntegerSlider(MenuDisplayMode.Both, "setting:overheat_scale", "OVERHEAT SCALE") .WithDefaultValue(20) .WithGetter(() => Mathf.RoundToInt(Config.HeatMetersScale * 20.0f)) .WithSetter(x => Config.HeatMetersScale = x / 20.0f) .LimitedByRange(1, 50) .WithDescription("Set the size of the overheat bars."), new IntegerSlider(MenuDisplayMode.Both, "setting:overheat_horizontal_offset", "OVERHEAT HORIZONTAL POSITION") .WithDefaultValue(0) .WithGetter(() => Config.HeatMetersHorizontalOffset) .WithSetter(x => Config.HeatMetersHorizontalOffset = x) .LimitedByRange(-200, 200) .WithDescription("Set the horizontal position offset of the overheat bars."), new IntegerSlider(MenuDisplayMode.Both, "setting:overheat_vertical_offset", "OVERHEAT VERTICAL POSITION") .WithDefaultValue(0) .WithGetter(() => Config.HeatMetersVerticalOffset) .WithSetter(x => Config.HeatMetersVerticalOffset = x) .LimitedByRange(-100, 100) .WithDescription("Set the vertical position offset of the overheat bars."), new IntegerSlider(MenuDisplayMode.Both, "setting:timer_scale", "TIMER SCALE") .WithDefaultValue(20) .WithGetter(() => Mathf.RoundToInt(Config.TimerScale * 20.0f)) .WithSetter(x => Config.TimerScale = x / 20.0f) .LimitedByRange(1, 50) .WithDescription("Set the size of the timer."), new IntegerSlider(MenuDisplayMode.Both, "setting:timer_vertical_offset", "TIMER VERTICAL OFFSET") .WithDefaultValue(0) .WithGetter(() => Config.TimerVerticalOffset) .WithSetter(x => Config.TimerVerticalOffset = x) .LimitedByRange(-100, 100) .WithDescription("Set the vertical position of the timer."), new SubMenu(MenuDisplayMode.Both, "menu:interface.advanced", "ADVANCED SETTINGS") .NavigatesTo(advancedDisplayMenu) .WithDescription("Configure advanced settings for the hud."), new ActionButton(MenuDisplayMode.Both, "action:preview_hud", "PREVIEW HUD") .WhenClicked(() => VisualDisplay.ForceDisplay = !VisualDisplay.ForceDisplay) .WithDescription("Show the hud to preview changes.") }; MenuTree audioMenu = new MenuTree("menu.mod.nitronichud#audio", "Audio Options"); MenuTree settingsMenu = new MenuTree("menu.mod.nitronichud", "Nitronic HUD Settings"); settingsMenu.Add( new SubMenu(MenuDisplayMode.Both, "menu:interface", "DISPLAY") .NavigatesTo(displayMenu) .WithDescription("Configure settings for the visual interface.")); if (Application.platform != RuntimePlatform.LinuxPlayer) { settingsMenu.Add( new SubMenu(MenuDisplayMode.Both, "menu:interface", "AUDIO".Colorize(Colors.gray)) .NavigatesTo(audioMenu) .WithDescription("Configure audio settings for the countdown announcer.")); } settingsMenu.Add( new ActionButton(MenuDisplayMode.MainMenu, "menu:interface", "PREVIEW SETTINGS".Colorize(Colors.gray)) .WhenClicked(() => { MessageBox.Create("This feature isn't implemented yet but will be in a future release.", "ERROR") .SetButtons(MessageButtons.Ok) .Show(); }) .WithDescription("Start the animation sequence thet plays when a level starts to preview the settings.")); //Menus.AddNew(MenuDisplayMode.Both, settingsMenu, "NITRONIC HUD [1E90FF](BETA)[-]", "Settings for the Nitronic HUD mod."); Menus.AddNew(MenuDisplayMode.Both, settingsMenu, "NITRONIC HUD [FFBF1E](RELEASE CANDIDATE)[-]", "Settings for the Nitronic HUD mod."); }
public void CreateSettingsMenu() { // TODO: Update readme instructions MenuTree settingsMenu = new MenuTree("menu.mod.decorativelamp", "Decorative Lamp Settings") { new CheckBox(MenuDisplayMode.Both, "setting:enable_lamp", "LAMP ENABLED") .WithGetter(() => Config.Enabled) .WithSetter((x) => Config.Enabled = x) .WithDescription(string.Format("{0}: Enlighten your way through the Array.", "Visual".Colorize(Colors.yellowGreen))), new ListBox <LampModel>(MenuDisplayMode.Both, "setting:lamp_model", "3D MODEL") .WithEntries(MapEnumToListBox <LampModel>()) .WithGetter(() => Config.MeshModel) .WithSetter(x => { Config.MeshModel = x; ChangeLampModel.Broadcast(new ChangeLampModel.Data(x)); }) .WithDescription(string.Format("{0}: Select the lamp 3D mesh.", "Visual".Colorize(Colors.yellowGreen))), new CheckBox(MenuDisplayMode.Both, "setting:enable_spin", "SPINNING LAMP") .WithGetter(() => Config.Spin) .WithSetter((x) => Config.Spin = x) .WithDescription(string.Format("{0}: Make the lamp spin.", "Visual".Colorize(Colors.yellowGreen))), new IntegerSlider(MenuDisplayMode.Both, "setting:spin_speed", "LAMP SPIN SPEED") .WithGetter(() => Config.SpinSpeed) .WithSetter((x) => Config.SpinSpeed = x) .LimitedByRange(-1000, 1000) .WithDefaultValue(50) .WithDescription(string.Format("{0}: Set the lamp spin speed.", "Visual".Colorize(Colors.yellowGreen))), new IntegerSlider(MenuDisplayMode.Both, "setting:lamp_scale", "LAMP SCALE") .WithGetter(() => Mathf.RoundToInt(Config.LampScale * 100.0f)) .WithSetter((x) => Config.LampScale = x / 100.0f) .LimitedByRange(0, 500) .WithDefaultValue(100) .WithDescription(string.Format("{0}: Set the lamp model size.", "Visual".Colorize(Colors.yellowGreen))), new IntegerSlider(MenuDisplayMode.Both, "setting:light_intensity", "LIGHT INTENSITY") .WithGetter(() => Mathf.RoundToInt(Config.LightIntensity * 100.0f)) .WithSetter((x) => Config.LightIntensity = x / 100.0f) .LimitedByRange(0, 1000) .WithDefaultValue(75) .WithDescription(string.Format("{0}: Set the lamp brightness.", "Visual".Colorize(Colors.yellowGreen))), new IntegerSlider(MenuDisplayMode.Both, "setting:light_range", "LIGHT RANGE") .WithGetter(() => Config.LightRange) .WithSetter((x) => Config.LightRange = x) .LimitedByRange(0, 100) .WithDefaultValue(20) .WithDescription(string.Format("{0}: Set the lamp light distance.", "Visual".Colorize(Colors.yellowGreen))), new IntegerSlider(MenuDisplayMode.Both, "setting:flare_brightness", "FLARE BRIGHTNESS") .WithGetter(() => Mathf.RoundToInt(Config.LightRange * 10.0f)) .WithSetter((x) => Config.FlareBrightness = x / 10.0f) .LimitedByRange(0, 20) .WithDefaultValue(10) .WithDescription(string.Format("{0}: Set the lens flare brightness.", "Visual".Colorize(Colors.yellowGreen))) }; Menus.AddNew(MenuDisplayMode.Both, settingsMenu, "DECORATIVE LAMP", "Settings for the Decorative Lamp mod."); }