1
0
mirror of https://github.com/jugeeya/UltimateTrainingModpack.git synced 2025-07-08 12:11:33 +00:00

Fix unweighted multiselects ()

This commit is contained in:
asimon-1
2024-12-19 07:53:33 -05:00
committed by GitHub
parent a175e83edf
commit 470e32e695
2 changed files with 88 additions and 15 deletions
training_mod_consts/src

@ -218,84 +218,98 @@ pub unsafe fn create_app<'a>() -> App<'a> {
"mash_state", "mash_state",
"Action to be performed as soon as possible", "Action to be performed as soon as possible",
ToggleMultiple, ToggleMultiple,
true,
)); ));
mash_tab_submenus.push(Action::to_submenu( mash_tab_submenus.push(Action::to_submenu(
"Followup Toggles", "Followup Toggles",
"follow_up", "follow_up",
"Actions to be performed after a Mash Option", "Actions to be performed after a Mash Option",
ToggleMultiple, ToggleMultiple,
true,
)); ));
mash_tab_submenus.push(MashTrigger::to_submenu( mash_tab_submenus.push(MashTrigger::to_submenu(
"Mash Triggers", "Mash Triggers",
"mash_triggers", "mash_triggers",
"Configure what causes the CPU to perform a Mash Option", "Configure what causes the CPU to perform a Mash Option",
ToggleSingle, ToggleMultiple,
false,
)); ));
mash_tab_submenus.push(AttackAngle::to_submenu( mash_tab_submenus.push(AttackAngle::to_submenu(
"Attack Angle", "Attack Angle",
"attack_angle", "attack_angle",
"For attacks that can be angled, such as some forward tilts", "For attacks that can be angled, such as some forward tilts",
ToggleMultiple, ToggleMultiple,
true,
)); ));
mash_tab_submenus.push(ThrowOption::to_submenu( mash_tab_submenus.push(ThrowOption::to_submenu(
"Throw Options", "Throw Options",
"throw_state", "throw_state",
"Throw to be performed when a grab is landed", "Throw to be performed when a grab is landed",
ToggleMultiple, ToggleMultiple,
true,
)); ));
mash_tab_submenus.push(MedDelay::to_submenu( mash_tab_submenus.push(MedDelay::to_submenu(
"Throw Delay", "Throw Delay",
"throw_delay", "throw_delay",
"How many frames to delay the throw option", "How many frames to delay the throw option",
ToggleMultiple, ToggleMultiple,
true,
)); ));
mash_tab_submenus.push(MedDelay::to_submenu( mash_tab_submenus.push(MedDelay::to_submenu(
"Pummel Delay", "Pummel Delay",
"pummel_delay", "pummel_delay",
"How many frames after a grab to wait before starting to pummel", "How many frames after a grab to wait before starting to pummel",
ToggleMultiple, ToggleMultiple,
true,
)); ));
mash_tab_submenus.push(BoolFlag::to_submenu( mash_tab_submenus.push(BoolFlag::to_submenu(
"Falling Aerials", "Falling Aerials",
"falling_aerials", "falling_aerials",
"Should aerials be performed when rising or when falling", "Should aerials be performed when rising or when falling",
ToggleMultiple, ToggleMultiple,
true,
)); ));
mash_tab_submenus.push(BoolFlag::to_submenu( mash_tab_submenus.push(BoolFlag::to_submenu(
"Full Hop", "Full Hop",
"full_hop", "full_hop",
"Should the CPU perform a ful hop or a short hop when jumping", "Should the CPU perform a full hop or a short hop when jumping",
ToggleMultiple, ToggleMultiple,
true,
)); ));
mash_tab_submenus.push(Delay::to_submenu( mash_tab_submenus.push(Delay::to_submenu(
"Aerial Delay", "Aerial Delay",
"aerial_delay", "aerial_delay",
"How long to delay an aerial attack", "How long to delay an aerial attack",
ToggleMultiple, ToggleMultiple,
true,
)); ));
mash_tab_submenus.push(BoolFlag::to_submenu( mash_tab_submenus.push(BoolFlag::to_submenu(
"Fast Fall", "Fast Fall",
"fast_fall", "fast_fall",
"Should the CPU fastfall during a jump", "Should the CPU fastfall during a jump",
ToggleMultiple, ToggleMultiple,
true,
)); ));
mash_tab_submenus.push(Delay::to_submenu( mash_tab_submenus.push(Delay::to_submenu(
"Fast Fall Delay", "Fast Fall Delay",
"fast_fall_delay", "fast_fall_delay",
"How many frames the CPU should delay their fastfall", "How many frames the CPU should delay their fastfall",
ToggleMultiple, ToggleMultiple,
true,
)); ));
mash_tab_submenus.push(Delay::to_submenu( mash_tab_submenus.push(Delay::to_submenu(
"OoS Offset", "OoS Offset",
"oos_offset", "oos_offset",
"How many times the CPU shield can be hit before performing a Mash option", "How many times the CPU shield can be hit before performing a Mash option",
ToggleMultiple, ToggleMultiple,
true,
)); ));
mash_tab_submenus.push(Delay::to_submenu( mash_tab_submenus.push(Delay::to_submenu(
"Reaction Time", "Reaction Time",
"reaction_time", "reaction_time",
"How many frames to delay before performing a Mash option", "How many frames to delay before performing a Mash option out of shield",
ToggleMultiple, ToggleMultiple,
true,
)); ));
let mash_tab = Tab { let mash_tab = Tab {
id: "mash", id: "mash",
@ -311,78 +325,91 @@ pub unsafe fn create_app<'a>() -> App<'a> {
"ledge_neutral_override", "ledge_neutral_override",
"Mash Actions to be performed after a Neutral Getup from ledge", "Mash Actions to be performed after a Neutral Getup from ledge",
ToggleMultiple, ToggleMultiple,
true,
)); ));
override_tab_submenus.push(Action::to_submenu( override_tab_submenus.push(Action::to_submenu(
"Ledge Roll", "Ledge Roll",
"ledge_roll_override", "ledge_roll_override",
"Mash Actions to be performed after a Roll Getup from ledge", "Mash Actions to be performed after a Roll Getup from ledge",
ToggleMultiple, ToggleMultiple,
true,
)); ));
override_tab_submenus.push(Action::to_submenu( override_tab_submenus.push(Action::to_submenu(
"Ledge Jump", "Ledge Jump",
"ledge_jump_override", "ledge_jump_override",
"Mash Actions to be performed after a Jump Get up from ledge", "Mash Actions to be performed after a Jump Get up from ledge",
ToggleMultiple, ToggleMultiple,
true,
)); ));
override_tab_submenus.push(Action::to_submenu( override_tab_submenus.push(Action::to_submenu(
"Ledge Attack", "Ledge Attack",
"ledge_attack_override", "ledge_attack_override",
"Mash Actions to be performed after a Getup Attack from ledge", "Mash Actions to be performed after a Getup Attack from ledge",
ToggleMultiple, ToggleMultiple,
true,
)); ));
override_tab_submenus.push(Action::to_submenu( override_tab_submenus.push(Action::to_submenu(
"Tech Action", "Tech Action",
"tech_action_override", "tech_action_override",
"Mash Actions to be performed after any tech action", "Mash Actions to be performed after any tech action",
ToggleMultiple, ToggleMultiple,
true,
)); ));
override_tab_submenus.push(Action::to_submenu( override_tab_submenus.push(Action::to_submenu(
"Clatter", "Clatter",
"clatter_override", "clatter_override",
"Mash Actions to be performed after leaving a clatter situation (grab, bury, etc)", "Mash Actions to be performed after leaving a clatter situation (grab, bury, etc)",
ToggleMultiple, ToggleMultiple,
true,
)); ));
override_tab_submenus.push(Action::to_submenu( override_tab_submenus.push(Action::to_submenu(
"Tumble", "Tumble",
"tumble_override", "tumble_override",
"Mash Actions to be performed after exiting a tumble state", "Mash Actions to be performed after exiting a tumble state",
ToggleMultiple, ToggleMultiple,
true,
)); ));
override_tab_submenus.push(Action::to_submenu( override_tab_submenus.push(Action::to_submenu(
"Hitstun", "Hitstun",
"hitstun_override", "hitstun_override",
"Mash Actions to be performed after exiting a hitstun state", "Mash Actions to be performed after exiting a hitstun state",
ToggleMultiple, ToggleMultiple,
true,
)); ));
override_tab_submenus.push(Action::to_submenu( override_tab_submenus.push(Action::to_submenu(
"Parry", "Parry",
"parry_override", "parry_override",
"Mash Actions to be performed after a parry", "Mash Actions to be performed after a parry",
ToggleMultiple, ToggleMultiple,
true,
)); ));
override_tab_submenus.push(Action::to_submenu( override_tab_submenus.push(Action::to_submenu(
"Shieldstun", "Shieldstun",
"shieldstun_override", "shieldstun_override",
"Mash Actions to be performed after exiting a shieldstun state", "Mash Actions to be performed after exiting a shieldstun state",
ToggleMultiple, ToggleMultiple,
true,
)); ));
override_tab_submenus.push(Action::to_submenu( override_tab_submenus.push(Action::to_submenu(
"Footstool", "Footstool",
"footstool_override", "footstool_override",
"Mash Actions to be performed after exiting a footstool state", "Mash Actions to be performed after exiting a footstool state",
ToggleMultiple, ToggleMultiple,
true,
)); ));
override_tab_submenus.push(Action::to_submenu( override_tab_submenus.push(Action::to_submenu(
"Landing", "Landing",
"landing_override", "landing_override",
"Mash Actions to be performed after landing on the ground", "Mash Actions to be performed after landing on the ground",
ToggleMultiple, ToggleMultiple,
true,
)); ));
override_tab_submenus.push(Action::to_submenu( override_tab_submenus.push(Action::to_submenu(
"Ledge Trump", "Ledge Trump",
"trump_override", "trump_override",
"Mash Actions to be performed after leaving a ledgetrump state", "Mash Actions to be performed after leaving a ledgetrump state",
ToggleMultiple, ToggleMultiple,
true,
)); ));
let override_tab = Tab { let override_tab = Tab {
id: "override", id: "override",
@ -402,75 +429,87 @@ pub unsafe fn create_app<'a>() -> App<'a> {
"air_dodge_dir", "air_dodge_dir",
"Direction to angle airdodges", "Direction to angle airdodges",
ToggleMultiple, ToggleMultiple,
true,
)); ));
defensive_tab_submenus.push(Direction::to_submenu( defensive_tab_submenus.push(Direction::to_submenu(
"DI Direction", "DI Direction",
"di_state", "di_state",
"Direction to angle the directional influence during hitlag", "Direction to angle the directional influence during hitlag",
ToggleMultiple, ToggleMultiple,
true,
)); ));
defensive_tab_submenus.push(Direction::to_submenu( defensive_tab_submenus.push(Direction::to_submenu(
"SDI Direction", "SDI Direction",
"sdi_state", "sdi_state",
"Direction to angle the smash directional influence during hitlag", "Direction to angle the smash directional influence during hitlag",
ToggleMultiple, ToggleMultiple,
true,
)); ));
defensive_tab_submenus.push(SdiFrequency::to_submenu( defensive_tab_submenus.push(SdiFrequency::to_submenu(
"SDI Strength", "SDI Strength",
"sdi_strength", "sdi_strength",
"Relative strength of the smash directional influence inputs", "Relative strength of the smash directional influence inputs",
ToggleMultiple, ToggleSingle,
false,
)); ));
defensive_tab_submenus.push(ClatterFrequency::to_submenu( defensive_tab_submenus.push(ClatterFrequency::to_submenu(
"Clatter Strength", "Clatter Strength",
"clatter_strength", "clatter_strength",
"Configure how rapidly the CPU will mash out of grabs, buries, etc.", "Configure how rapidly the CPU will mash out of grabs, buries, etc.",
ToggleMultiple, ToggleSingle,
false,
)); ));
defensive_tab_submenus.push(LedgeOption::to_submenu( defensive_tab_submenus.push(LedgeOption::to_submenu(
"Ledge Options", "Ledge Options",
"ledge_state", "ledge_state",
"Actions to be taken when on the ledge", "Actions to be taken when on the ledge",
ToggleMultiple, ToggleMultiple,
true,
)); ));
defensive_tab_submenus.push(LongDelay::to_submenu( defensive_tab_submenus.push(LongDelay::to_submenu(
"Ledge Delay", "Ledge Delay",
"ledge_delay", "ledge_delay",
"How many frames to delay the ledge option", "How many frames to delay the ledge option",
ToggleMultiple, ToggleMultiple,
true,
)); ));
defensive_tab_submenus.push(TechFlags::to_submenu( defensive_tab_submenus.push(TechFlags::to_submenu(
"Tech Options", "Tech Options",
"tech_state", "tech_state",
"Actions to take when slammed into a hard surface", "Actions to take when slammed into a hard surface",
ToggleMultiple, ToggleMultiple,
true,
)); ));
defensive_tab_submenus.push(MissTechFlags::to_submenu( defensive_tab_submenus.push(MissTechFlags::to_submenu(
"Mistech Options", "Mistech Options",
"miss_tech_state", "miss_tech_state",
"Actions to take after missing a tech", "Actions to take after missing a tech",
ToggleMultiple, ToggleMultiple,
true,
)); ));
defensive_tab_submenus.push(Shield::to_submenu( defensive_tab_submenus.push(Shield::to_submenu(
"Shield Toggles", "Shield Toggles",
"shield_state", "shield_state",
"CPU Shield Behavior", "CPU Shield Behavior",
ToggleSingle, ToggleSingle,
false,
)); ));
defensive_tab_submenus.push(Direction::to_submenu( defensive_tab_submenus.push(Direction::to_submenu(
"Shield Tilt", "Shield Tilt",
"shield_tilt", "shield_tilt",
"Direction to tilt the shield", "Direction to tilt the shield",
ToggleSingle, ToggleSingle,
false,
)); ));
defensive_tab_submenus.push(OnOff::to_submenu( defensive_tab_submenus.push(OnOff::to_submenu(
"Crouch", "Crouch",
"crouch", "crouch",
"Have the CPU crouch when on the ground", "Have the CPU crouch when on the ground",
ToggleSingle, ToggleSingle,
false,
)); ));
defensive_tab_submenus.push(OnOff::to_submenu("Dodge Staling", "stale_dodges", "Controls whether the CPU's dodges will worsen with repetitive use\n(Note: This can setting can cause combo behavior not possible in the original game)", ToggleSingle)); defensive_tab_submenus.push(OnOff::to_submenu("Dodge Staling", "stale_dodges", "Controls whether the CPU's dodges will worsen with repetitive use\n(Note: This can setting can cause combo behavior not possible in the original game)", ToggleSingle, false));
defensive_tab_submenus.push(OnOff::to_submenu("Hide Tech Animations", "tech_hide", "Hides tech animations and effects after 7 frames to help with reacting to tech animation startup", ToggleSingle)); defensive_tab_submenus.push(OnOff::to_submenu("Hide Tech Animations", "tech_hide", "Hides tech animations and effects after 7 frames to help with reacting to tech animation startup", ToggleSingle, false));
let defensive_tab = Tab { let defensive_tab = Tab {
id: "defensive", id: "defensive",
title: "Defensive Settings", title: "Defensive Settings",
@ -489,54 +528,63 @@ pub unsafe fn create_app<'a>() -> App<'a> {
"recording_slot", "recording_slot",
"Choose which slot to record into", "Choose which slot to record into",
ToggleSingle, ToggleSingle,
false,
)); ));
input_recording_tab_submenus.push(RecordTrigger::to_submenu( input_recording_tab_submenus.push(RecordTrigger::to_submenu(
"Recording Trigger", "Recording Trigger",
"record_trigger", "record_trigger",
"Whether to begin recording via button combination or upon loading a Save State", "Whether to begin recording via button combination or upon loading a Save State",
ToggleSingle, ToggleSingle,
false,
)); ));
input_recording_tab_submenus.push(RecordingDuration::to_submenu( input_recording_tab_submenus.push(RecordingDuration::to_submenu(
"Recording Duration", "Recording Duration",
"recording_duration", "recording_duration",
"How long an input recording should last in frames", "How long an input recording should last in frames",
ToggleSingle, ToggleSingle,
false,
)); ));
input_recording_tab_submenus.push(OnOff::to_submenu( input_recording_tab_submenus.push(OnOff::to_submenu(
"Recording Crop", "Recording Crop",
"recording_crop", "recording_crop",
"Remove neutral input frames at the end of your recording", "Remove neutral input frames at the end of your recording",
ToggleSingle, ToggleSingle,
false,
)); ));
input_recording_tab_submenus.push(PlaybackSlot::to_submenu( input_recording_tab_submenus.push(PlaybackSlot::to_submenu(
"Playback Button Slots", "Playback Button Slots",
"playback_button_slots", "playback_button_slots",
"Choose which slots to playback input recording upon pressing button combination", "Choose which slots to playback input recording upon pressing button combination",
ToggleMultiple, ToggleMultiple,
true,
)); ));
input_recording_tab_submenus.push(HitstunPlayback::to_submenu( input_recording_tab_submenus.push(HitstunPlayback::to_submenu(
"Playback Hitstun Timing", "Playback Hitstun Timing",
"hitstun_playback", "hitstun_playback",
"When to begin playing back inputs when a hitstun mash trigger occurs", "When to begin playing back inputs when a hitstun mash trigger occurs",
ToggleSingle, ToggleSingle,
false,
)); ));
input_recording_tab_submenus.push(PlaybackSlot::to_submenu( input_recording_tab_submenus.push(PlaybackSlot::to_submenu(
"Save State Playback", "Save State Playback",
"save_state_playback", "save_state_playback",
"Choose which slots to playback input recording upon loading a save state", "Choose which slots to playback input recording upon loading a save state",
ToggleMultiple, ToggleMultiple,
true,
)); ));
input_recording_tab_submenus.push(OnOff::to_submenu( input_recording_tab_submenus.push(OnOff::to_submenu(
"Playback Mash Interrupt", "Playback Mash Interrupt",
"playback_mash", "playback_mash",
"End input playback when a mash trigger occurs", "End input playback when a mash trigger occurs",
ToggleSingle, ToggleSingle,
false,
)); ));
input_recording_tab_submenus.push(OnOff::to_submenu( input_recording_tab_submenus.push(OnOff::to_submenu(
"Playback Loop", "Playback Loop",
"playback_loop", "playback_loop",
"Repeat triggered input playbacks indefinitely", "Repeat triggered input playbacks indefinitely",
ToggleSingle, ToggleSingle,
false,
)); ));
let input_tab = Tab { let input_tab = Tab {
id: "input", id: "input",
@ -551,30 +599,34 @@ pub unsafe fn create_app<'a>() -> App<'a> {
// Button Tab // Button Tab
let mut button_tab_submenus: Vec<SubMenu> = Vec::new(); let mut button_tab_submenus: Vec<SubMenu> = Vec::new();
button_tab_submenus.push(OnOff::to_submenu("Menu Open Start Press", "menu_open_start_press", "Hold start or press minus to open the mod menu. To open the original menu, press start.\nThe default menu open option is always available as Hold DPad Up + Press B.", ToggleSingle)); button_tab_submenus.push(OnOff::to_submenu("Menu Open Start Press", "menu_open_start_press", "Hold start or press minus to open the mod menu. To open the original menu, press start.\nThe default menu open option is always available as Hold DPad Up + Press B.", ToggleSingle, false));
button_tab_submenus.push(ButtonConfig::to_submenu( button_tab_submenus.push(ButtonConfig::to_submenu(
"Save State Save", "Save State Save",
"save_state_save", "save_state_save",
"Hold any one button and press the others to trigger", "Hold any one button and press the others to trigger",
ToggleSingle, ToggleMultiple,
false,
)); ));
button_tab_submenus.push(ButtonConfig::to_submenu( button_tab_submenus.push(ButtonConfig::to_submenu(
"Save State Load", "Save State Load",
"save_state_load", "save_state_load",
"Hold any one button and press the others to trigger", "Hold any one button and press the others to trigger",
ToggleSingle, ToggleMultiple,
false,
)); ));
button_tab_submenus.push(ButtonConfig::to_submenu( button_tab_submenus.push(ButtonConfig::to_submenu(
"Input Record", "Input Record",
"input_record", "input_record",
"Hold any one button and press the others to trigger", "Hold any one button and press the others to trigger",
ToggleSingle, ToggleMultiple,
false,
)); ));
button_tab_submenus.push(ButtonConfig::to_submenu( button_tab_submenus.push(ButtonConfig::to_submenu(
"Input Playback", "Input Playback",
"input_playback", "input_playback",
"Hold any one button and press the others to trigger", "Hold any one button and press the others to trigger",
ToggleSingle, ToggleMultiple,
false,
)); ));
let button_tab = Tab { let button_tab = Tab {
id: "button", id: "button",
@ -594,66 +646,77 @@ pub unsafe fn create_app<'a>() -> App<'a> {
"save_state_mirroring", "save_state_mirroring",
"Flips save states in the left-right direction across the stage center", "Flips save states in the left-right direction across the stage center",
ToggleSingle, ToggleSingle,
false,
)); ));
save_state_tab_submenus.push(OnOff::to_submenu( save_state_tab_submenus.push(OnOff::to_submenu(
"Auto Save States", "Auto Save States",
"save_state_autoload", "save_state_autoload",
"Load save state when any fighter dies", "Load save state when any fighter dies",
ToggleSingle, ToggleSingle,
false,
)); ));
save_state_tab_submenus.push(SaveDamage::to_submenu( save_state_tab_submenus.push(SaveDamage::to_submenu(
"Save Dmg (CPU)", "Save Dmg (CPU)",
"save_damage_cpu", "save_damage_cpu",
"Should save states retain CPU damage", "Should save states retain CPU damage",
ToggleSingle, ToggleSingle,
false,
)); ));
save_state_tab_submenus.push(DamagePercent::to_submenu( save_state_tab_submenus.push(DamagePercent::to_submenu(
"Dmg Range (CPU)", "Dmg Range (CPU)",
"save_damage_limits_cpu", "save_damage_limits_cpu",
"Limits on Random Damage to apply to the CPU when loading a save state", "Limits on Random Damage to apply to the CPU when loading a save state",
Slider, Slider,
false,
)); ));
save_state_tab_submenus.push(SaveDamage::to_submenu( save_state_tab_submenus.push(SaveDamage::to_submenu(
"Save Dmg (Player)", "Save Dmg (Player)",
"save_damage_player", "save_damage_player",
"Should save states retain player damage", "Should save states retain player damage",
ToggleSingle, ToggleSingle,
false,
)); ));
save_state_tab_submenus.push(DamagePercent::to_submenu( save_state_tab_submenus.push(DamagePercent::to_submenu(
"Dmg Range (Player)", "Dmg Range (Player)",
"save_damage_limits_player", "save_damage_limits_player",
"Limits on random damage to apply to the player when loading a save state", "Limits on random damage to apply to the player when loading a save state",
Slider, Slider,
false,
)); ));
save_state_tab_submenus.push(OnOff::to_submenu( save_state_tab_submenus.push(OnOff::to_submenu(
"Enable Save States", "Enable Save States",
"save_state_enable", "save_state_enable",
"Enable save states! Save a state with Shield+Down Taunt, load it with Shield+Up Taunt.", "Enable save states! Save a state with Shield+Down Taunt, load it with Shield+Up Taunt.",
ToggleSingle, ToggleSingle,
false,
)); ));
save_state_tab_submenus.push(SaveStateSlot::to_submenu( save_state_tab_submenus.push(SaveStateSlot::to_submenu(
"Save State Slot", "Save State Slot",
"save_state_slot", "save_state_slot",
"Save and load states from different slots.", "Save and load states from different slots.",
ToggleSingle, ToggleSingle,
false,
)); ));
save_state_tab_submenus.push(SaveStateSlot::to_submenu( save_state_tab_submenus.push(SaveStateSlot::to_submenu(
"Randomize Slots", "Randomize Slots",
"randomize_slots", "randomize_slots",
"Slots to randomize when loading save state.", "Slots to randomize when loading save state.",
ToggleMultiple, ToggleMultiple,
true,
)); ));
save_state_tab_submenus.push(CharacterItem::to_submenu( save_state_tab_submenus.push(CharacterItem::to_submenu(
"Character Item", "Character Item",
"character_item", "character_item",
"The item to give to the player's fighter when loading a save state", "The item to give to the player's fighter when loading a save state",
ToggleSingle, ToggleSingle,
false,
)); ));
save_state_tab_submenus.push(BuffOption::to_submenu( save_state_tab_submenus.push(BuffOption::to_submenu(
"Buff Options", "Buff Options",
"buff_state", "buff_state",
"Buff(s) to be applied to the respective fighters when loading a save state", "Buff(s) to be applied to the respective fighters when loading a save state",
ToggleSingle, ToggleMultiple,
false,
)); ));
let save_state_tab = Tab { let save_state_tab = Tab {
id: "save_state", id: "save_state",
@ -668,54 +731,62 @@ pub unsafe fn create_app<'a>() -> App<'a> {
// Miscellaneous Tab // Miscellaneous Tab
let mut misc_tab_submenus: Vec<SubMenu> = Vec::new(); let mut misc_tab_submenus: Vec<SubMenu> = Vec::new();
misc_tab_submenus.push(OnOff::to_submenu("Frame Advantage", "frame_advantage", "Display the time difference between when the player is actionable and the CPU is actionable\nNote that the CPU must not be mashing any options.", ToggleSingle)); misc_tab_submenus.push(OnOff::to_submenu("Frame Advantage", "frame_advantage", "Display the time difference between when the player is actionable and the CPU is actionable\nNote that the CPU must not be mashing any options.", ToggleSingle, false));
misc_tab_submenus.push(OnOff::to_submenu( misc_tab_submenus.push(OnOff::to_submenu(
"Hitbox Visualization", "Hitbox Visualization",
"hitbox_vis", "hitbox_vis",
"Display a visual representation for active hitboxes (hides other visual effects)", "Display a visual representation for active hitboxes (hides other visual effects)",
ToggleSingle, ToggleSingle,
false,
)); ));
misc_tab_submenus.push(InputDisplay::to_submenu( misc_tab_submenus.push(InputDisplay::to_submenu(
"Input Display", "Input Display",
"input_display", "input_display",
"Log inputs in a queue on the left of the screen", "Log inputs in a queue on the left of the screen",
ToggleSingle, ToggleSingle,
false,
)); ));
misc_tab_submenus.push(OnOff::to_submenu( misc_tab_submenus.push(OnOff::to_submenu(
"Input Display Status", "Input Display Status",
"input_display_status", "input_display_status",
"Group input logs by status in which they occurred", "Group input logs by status in which they occurred",
ToggleSingle, ToggleSingle,
false,
)); ));
misc_tab_submenus.push(Delay::to_submenu( misc_tab_submenus.push(Delay::to_submenu(
"Input Delay", "Input Delay",
"input_delay", "input_delay",
"Frames to delay player inputs by", "Frames to delay player inputs by",
ToggleSingle, ToggleSingle,
false,
)); ));
misc_tab_submenus.push(OnOff::to_submenu( misc_tab_submenus.push(OnOff::to_submenu(
"Stage Hazards", "Stage Hazards",
"stage_hazards", "stage_hazards",
"Turn stage hazards on/off", "Turn stage hazards on/off",
ToggleSingle, ToggleSingle,
false,
)); ));
misc_tab_submenus.push(OnOff::to_submenu( misc_tab_submenus.push(OnOff::to_submenu(
"HUD", "HUD",
"hud", "hud",
"Show/hide elements of the UI", "Show/hide elements of the UI",
ToggleSingle, ToggleSingle,
false,
)); ));
misc_tab_submenus.push(UpdatePolicy::to_submenu( misc_tab_submenus.push(UpdatePolicy::to_submenu(
"Auto-Update", "Auto-Update",
"update_policy", "update_policy",
"What type of Training Modpack updates to automatically apply. (Console Only!)", "What type of Training Modpack updates to automatically apply. (Console Only!)",
ToggleSingle, ToggleSingle,
false,
)); ));
misc_tab_submenus.push(OnOff::to_submenu( misc_tab_submenus.push(OnOff::to_submenu(
"L+R+A Reset", "L+R+A Reset",
"lra_reset", "lra_reset",
"Reset Training Room when pressing L+R+A", "Reset Training Room when pressing L+R+A",
ToggleSingle, ToggleSingle,
false,
)); ));
let misc_tab = Tab { let misc_tab = Tab {
id: "misc", id: "misc",

@ -15,6 +15,7 @@ pub trait SubMenuTrait {
id: &'a str, id: &'a str,
help_text: &'a str, help_text: &'a str,
submenu_type: SubMenuType, submenu_type: SubMenuType,
allow_weights: bool,
) -> SubMenu<'a>; ) -> SubMenu<'a>;
} }
@ -27,6 +28,7 @@ macro_rules! impl_submenutrait {
id: &'a str, id: &'a str,
help_text: &'a str, help_text: &'a str,
submenu_type: SubMenuType, submenu_type: SubMenuType,
allow_weights: bool,
) -> SubMenu<'a> { ) -> SubMenu<'a> {
match submenu_type { match submenu_type {
SubMenuType::ToggleSingle => { SubMenuType::ToggleSingle => {
@ -51,7 +53,7 @@ macro_rules! impl_submenutrait {
} }
SubMenuType::ToggleMultiple => { SubMenuType::ToggleMultiple => {
let value = 0; let value = 0;
let max = TOGGLE_MAX; let max = if allow_weights { TOGGLE_MAX } else { 1 };
let toggles_vec: Vec<Toggle> = Self::ALL_NAMES let toggles_vec: Vec<Toggle> = Self::ALL_NAMES
.iter() .iter()
.map(|title| Toggle { title, value, max }) .map(|title| Toggle { title, value, max })