diff --git a/README.md b/README.md index 0e2e610..acdd203 100644 --- a/README.md +++ b/README.md @@ -517,7 +517,7 @@ These are the features that can be found [in the latest beta release](https://gi * **Mash Overrides**: Specify which mash options to perform in specific scenarios - @GradualSyrup, @asimon-1 * **Hide Tech Animations**: Animations and the CPU cursor are are hidden (character model/effects are invisible) during when the CPU is teching-- use this to practice true reaction tech chasing! The fixed camera is also modified on legal stages to aid this practice. - @GradualSyrup * **Customizable Button Configs**: Configure button combinations for save states and input recording in the menu itself. Please note that we now use raw inputs rather than Smash inputs, and save state save/load binds have moved to `L+DPad Down`, `L+DPad Up` respectively - @jugeeya -* **Press Start/Select to Open Menu**: You can now open the menu with start press; holding start for >= 10 frames gives the original menu. On controllers with the minus button, minus can also be used to open the menu. This behavior can be toggled, and the old default `B+DPad Up` will always work. This change allows for much more seamless opening and closing of the modpack's menu - @jugeeya +* **Press Start/Select to Open Menu**: You can now open the menu with start hold; pressing start for < 10 frames gives the original menu. On controllers with the minus button, minus can also be used to open the menu. This behavior can be toggled, and the old default `B+DPad Up` will always work. This change allows for much more seamless opening and closing of the modpack's menu - @jugeeya * **Dodge Staling**: Control whether the CPU is affected by the game's default dodge (roll, airdodge, etc.) staling mechanism. - @GradualSyrup ## Bugfixes diff --git a/src/common/button_config.rs b/src/common/button_config.rs index f6993e1..f188abc 100644 --- a/src/common/button_config.rs +++ b/src/common/button_config.rs @@ -246,28 +246,30 @@ pub fn handle_final_input_mapping(player_idx: i32, controller_struct: &mut SomeC p1_controller.current_buttons.set_plus(false); p1_controller.just_down.set_plus(false); p1_controller.just_release.set_plus(false); + if *start_hold_frames >= 10 && unsafe { !VANILLA_MENU_ACTIVE } { + // If we've held for more than 10 frames, + // let's open the training mod menu + start_menu_request = true; + } } else { - if *start_hold_frames > 0 && menu_close_wait_frame == 0 { - // Here, we just finished holding start - if *start_hold_frames < 10 - && unsafe { !VANILLA_MENU_ACTIVE } - && menu_close_wait_frame == 0 - { - // If we held for fewer than 10 frames, let's open the training mod menu - start_menu_request = true; - } else if unsafe { !QUICK_MENU_ACTIVE } { - // Otherwise, let's let the game know that we had pressed start - // So long as our menu isn't active - p1_controller.current_buttons.set_plus(true); - p1_controller.just_down.set_plus(true); - unsafe { - VANILLA_MENU_ACTIVE = true; - } + // Here, we just finished holding start + if *start_hold_frames > 0 + && *start_hold_frames < 10 + && unsafe { !QUICK_MENU_ACTIVE } + && menu_close_wait_frame == 0 + { + // If we held for fewer than 10 frames, let's let the game know that + // we had pressed start + p1_controller.current_buttons.set_plus(true); + p1_controller.just_down.set_plus(true); + unsafe { + VANILLA_MENU_ACTIVE = true; } } *start_hold_frames = 0; } + // If we ever press minus, open the mod menu if p1_controller.current_buttons.minus() { start_menu_request = true; } diff --git a/src/lib.rs b/src/lib.rs index c158430..dcbb0c0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -121,7 +121,7 @@ pub fn main() { notification( "Open Menu".to_string(), if MENU.menu_open_start_press == OnOff::On { - "Start".to_string() + "Hold Start".to_string() } else { DEFAULT_OPEN_MENU_CONFIG.to_string() }, diff --git a/training_mod_consts/src/lib.rs b/training_mod_consts/src/lib.rs index 8db3fca..f1b2e16 100644 --- a/training_mod_consts/src/lib.rs +++ b/training_mod_consts/src/lib.rs @@ -355,7 +355,7 @@ pub unsafe fn ui_menu(menu: TrainingModpackMenu) -> UiMenu { button_tab.add_submenu_with_toggles::( "Menu Open Start Press".to_string(), "menu_open_start_press".to_string(), - "Menu Open Start Press: Press start to open the mod menu. To open the original menu, hold start.\nThe default menu open option is always available as Hold B + Press DPad Up.".to_string(), + "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.".to_string(), true, &(menu.menu_open_start_press as u32), );