1
0
Fork 0
mirror of https://github.com/jugeeya/UltimateTrainingModpack.git synced 2024-11-27 20:34:03 +00:00

[Menu Open] Switch hold vs press, immediately take input if holding for >= 10 frames (#630)

* Switch hold vs press, immediately take input if holding for >= 10 frames

* Update README.md
This commit is contained in:
jugeeya 2023-09-10 11:21:16 -07:00 committed by GitHub
parent d8ecebfe12
commit 427609ba8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 19 deletions

View file

@ -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 * **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 * **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 * **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 * **Dodge Staling**: Control whether the CPU is affected by the game's default dodge (roll, airdodge, etc.) staling mechanism. - @GradualSyrup
## Bugfixes ## Bugfixes

View file

@ -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.current_buttons.set_plus(false);
p1_controller.just_down.set_plus(false); p1_controller.just_down.set_plus(false);
p1_controller.just_release.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 { } else {
if *start_hold_frames > 0 && menu_close_wait_frame == 0 {
// Here, we just finished holding start // Here, we just finished holding start
if *start_hold_frames < 10 if *start_hold_frames > 0
&& unsafe { !VANILLA_MENU_ACTIVE } && *start_hold_frames < 10
&& unsafe { !QUICK_MENU_ACTIVE }
&& menu_close_wait_frame == 0 && menu_close_wait_frame == 0
{ {
// If we held for fewer than 10 frames, let's open the training mod menu // If we held for fewer than 10 frames, let's let the game know that
start_menu_request = true; // we had pressed start
} 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.current_buttons.set_plus(true);
p1_controller.just_down.set_plus(true); p1_controller.just_down.set_plus(true);
unsafe { unsafe {
VANILLA_MENU_ACTIVE = true; VANILLA_MENU_ACTIVE = true;
} }
} }
}
*start_hold_frames = 0; *start_hold_frames = 0;
} }
// If we ever press minus, open the mod menu
if p1_controller.current_buttons.minus() { if p1_controller.current_buttons.minus() {
start_menu_request = true; start_menu_request = true;
} }

View file

@ -121,7 +121,7 @@ pub fn main() {
notification( notification(
"Open Menu".to_string(), "Open Menu".to_string(),
if MENU.menu_open_start_press == OnOff::On { if MENU.menu_open_start_press == OnOff::On {
"Start".to_string() "Hold Start".to_string()
} else { } else {
DEFAULT_OPEN_MENU_CONFIG.to_string() DEFAULT_OPEN_MENU_CONFIG.to_string()
}, },

View file

@ -355,7 +355,7 @@ pub unsafe fn ui_menu(menu: TrainingModpackMenu) -> UiMenu {
button_tab.add_submenu_with_toggles::<OnOff>( button_tab.add_submenu_with_toggles::<OnOff>(
"Menu Open Start Press".to_string(), "Menu Open Start Press".to_string(),
"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, true,
&(menu.menu_open_start_press as u32), &(menu.menu_open_start_press as u32),
); );