mirror of
https://github.com/jugeeya/UltimateTrainingModpack.git
synced 2024-11-24 02:44:17 +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:
parent
d8ecebfe12
commit
427609ba8e
4 changed files with 21 additions and 19 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
},
|
||||
|
|
|
@ -355,7 +355,7 @@ pub unsafe fn ui_menu(menu: TrainingModpackMenu) -> UiMenu {
|
|||
button_tab.add_submenu_with_toggles::<OnOff>(
|
||||
"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),
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue