1
0
Fork 0
mirror of https://github.com/jugeeya/UltimateTrainingModpack.git synced 2024-11-24 02:44:17 +00:00

Save State Slots: Add enabler toggle, switch to Shield+Left/Right (#505)

* Switch to Shield+Left/Right

* Add option in menu
This commit is contained in:
jugeeya 2023-03-13 22:12:24 -07:00 committed by GitHub
parent 89569c7154
commit 58a18de2b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 4 deletions

View file

@ -119,11 +119,11 @@ fn save_all_btn_config_from_defaults() {
press: vec!["UPTAUNT".to_string()],
},
previous_save_state_slot: BtnList {
hold: vec!["GRAB".to_string()],
hold: vec!["SHIELD".to_string()],
press: vec!["LEFTTAUNT".to_string()],
},
next_save_state_slot: BtnList {
hold: vec!["GRAB".to_string()],
hold: vec!["SHIELD".to_string()],
press: vec!["RIGHTTAUNT".to_string()],
},
},
@ -270,10 +270,10 @@ hold=["GRAB",]
press=["UPTAUNT",]
[button_config.previous_save_state_slot]
hold=["GRAB",]
hold=["SHIELD",]
press=["LEFTTAUNT",]
[button_config.next_save_state_slot]
hold=["GRAB",]
hold=["SHIELD",]
press=["RIGHTTAUNT",]
"#;

View file

@ -48,6 +48,7 @@ pub struct TrainingModpackMenu {
pub save_damage_limits_player: DamagePercent,
pub save_state_autoload: OnOff,
pub save_state_enable: OnOff,
pub save_state_slot_enable: OnOff,
pub save_state_mirroring: SaveStateMirroring,
pub sdi_state: Direction,
pub sdi_strength: SdiFrequency,
@ -123,6 +124,7 @@ pub static DEFAULTS_MENU: TrainingModpackMenu = TrainingModpackMenu {
save_damage_limits_player: DamagePercent::default(),
save_state_autoload: OnOff::Off,
save_state_enable: OnOff::On,
save_state_slot_enable: OnOff::On,
save_state_mirroring: SaveStateMirroring::None,
sdi_state: Direction::empty(),
sdi_strength: SdiFrequency::None,
@ -527,6 +529,19 @@ pub unsafe fn ui_menu(menu: TrainingModpackMenu) -> UiMenu<'static> {
true,
&(menu.save_state_enable as u32),
);
save_state_tab.add_submenu_with_toggles::<OnOff>(
"Enable Slots",
"save_state_slot_enable",
"Save State Slots: Enable save state slots. Switch to a different slot with Shield+Left or Right Taunt.",
true,
&(menu.save_state_enable as u32),
);
save_state_tab.add_submenu_with_toggles::<CharacterItem>(
"Character Item",
"character_item",