mirror of
https://github.com/jugeeya/UltimateTrainingModpack.git
synced 2025-01-31 22:47:25 +00:00
More menu improvements (#215)
* Update LongDelay.into_string() * Add missing submenus Co-authored-by: asimon-1 <asimon1@protonmail.com>
This commit is contained in:
parent
8757bb9a0e
commit
91348ed6cd
2 changed files with 56 additions and 38 deletions
|
@ -542,36 +542,36 @@ impl LongDelay {
|
|||
pub fn into_string(self) -> String {
|
||||
match self {
|
||||
LongDelay::D0 => "0",
|
||||
LongDelay::D10 => "1",
|
||||
LongDelay::D20 => "2",
|
||||
LongDelay::D30 => "3",
|
||||
LongDelay::D40 => "4",
|
||||
LongDelay::D50 => "5",
|
||||
LongDelay::D60 => "6",
|
||||
LongDelay::D70 => "7",
|
||||
LongDelay::D80 => "8",
|
||||
LongDelay::D90 => "9",
|
||||
LongDelay::D100 => "10",
|
||||
LongDelay::D110 => "11",
|
||||
LongDelay::D120 => "12",
|
||||
LongDelay::D130 => "13",
|
||||
LongDelay::D140 => "14",
|
||||
LongDelay::D150 => "15",
|
||||
LongDelay::D160 => "16",
|
||||
LongDelay::D170 => "17",
|
||||
LongDelay::D180 => "18",
|
||||
LongDelay::D190 => "19",
|
||||
LongDelay::D200 => "20",
|
||||
LongDelay::D210 => "21",
|
||||
LongDelay::D220 => "22",
|
||||
LongDelay::D230 => "23",
|
||||
LongDelay::D240 => "24",
|
||||
LongDelay::D250 => "25",
|
||||
LongDelay::D260 => "26",
|
||||
LongDelay::D270 => "27",
|
||||
LongDelay::D280 => "28",
|
||||
LongDelay::D290 => "29",
|
||||
LongDelay::D300 => "30",
|
||||
LongDelay::D10 => "10",
|
||||
LongDelay::D20 => "20",
|
||||
LongDelay::D30 => "30",
|
||||
LongDelay::D40 => "40",
|
||||
LongDelay::D50 => "50",
|
||||
LongDelay::D60 => "60",
|
||||
LongDelay::D70 => "70",
|
||||
LongDelay::D80 => "80",
|
||||
LongDelay::D90 => "90",
|
||||
LongDelay::D100 => "100",
|
||||
LongDelay::D110 => "110",
|
||||
LongDelay::D120 => "120",
|
||||
LongDelay::D130 => "130",
|
||||
LongDelay::D140 => "140",
|
||||
LongDelay::D150 => "150",
|
||||
LongDelay::D160 => "160",
|
||||
LongDelay::D170 => "170",
|
||||
LongDelay::D180 => "180",
|
||||
LongDelay::D190 => "190",
|
||||
LongDelay::D200 => "200",
|
||||
LongDelay::D210 => "210",
|
||||
LongDelay::D220 => "220",
|
||||
LongDelay::D230 => "230",
|
||||
LongDelay::D240 => "240",
|
||||
LongDelay::D250 => "250",
|
||||
LongDelay::D260 => "260",
|
||||
LongDelay::D270 => "270",
|
||||
LongDelay::D280 => "280",
|
||||
LongDelay::D290 => "290",
|
||||
LongDelay::D300 => "300",
|
||||
_ => "",
|
||||
}.to_string()
|
||||
}
|
||||
|
@ -610,7 +610,7 @@ impl BoolFlag {
|
|||
|
||||
|
||||
#[repr(u32)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, FromPrimitive)]
|
||||
#[allow(dead_code)]
|
||||
pub enum SdiStrength {
|
||||
Normal = 0,
|
||||
|
@ -746,10 +746,12 @@ impl TrainingModpackMenu {
|
|||
(oos_offset = Delay::from_bits(val))
|
||||
(reaction_time = Delay::from_bits(val))
|
||||
(sdi_state = Direction::from_bits(val))
|
||||
(sdi_strength = num::FromPrimitive::from_u32(val))
|
||||
(shield_state = num::FromPrimitive::from_u32(val))
|
||||
(shield_tilt = Direction::from_bits(val))
|
||||
(stage_hazards = OnOff::from_val(val))
|
||||
(tech_state = TechFlags::from_bits(val))
|
||||
(save_damage = OnOff::from_val(val))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -238,6 +238,7 @@ pub unsafe fn write_menu() {
|
|||
add_bitflag_submenu!(overall_menu, "Miss Tech Options", miss_tech_state, MissTechFlags);
|
||||
add_bitflag_submenu!(overall_menu, "Defensive Options", defensive_state, Defensive);
|
||||
|
||||
add_bitflag_submenu!(overall_menu, "Aerial Delay", aerial_delay, Delay);
|
||||
add_bitflag_submenu!(overall_menu, "OoS Offset", oos_offset, Delay);
|
||||
add_bitflag_submenu!(overall_menu, "Reaction Time", reaction_time, Delay);
|
||||
|
||||
|
@ -247,14 +248,25 @@ pub unsafe fn write_menu() {
|
|||
add_bitflag_submenu!(overall_menu, "Full Hop", full_hop, BoolFlag);
|
||||
|
||||
add_bitflag_submenu!(overall_menu, "Shield Tilt", shield_tilt, Direction);
|
||||
|
||||
add_bitflag_submenu!(overall_menu, "DI", di_state, Direction);
|
||||
add_bitflag_submenu!(overall_menu, "SDI", sdi_state, Direction);
|
||||
add_bitflag_submenu!(overall_menu, "DI Direction", di_state, Direction);
|
||||
add_bitflag_submenu!(overall_menu, "SDI Direction", sdi_state, Direction);
|
||||
add_bitflag_submenu!(overall_menu, "Airdodge Direction", air_dodge_dir, Direction);
|
||||
|
||||
overall_menu.add_sub_menu(
|
||||
"Shield Toggles",
|
||||
"shield_state",
|
||||
"SDI Strength",
|
||||
"sdi_strength",
|
||||
MENU.sdi_strength as usize,
|
||||
[
|
||||
("Normal", SdiStrength::Normal as usize),
|
||||
("Medium", SdiStrength::Medium as usize),
|
||||
("High", SdiStrength::High as usize),
|
||||
].to_vec(),
|
||||
[].to_vec()
|
||||
);
|
||||
|
||||
overall_menu.add_sub_menu(
|
||||
"Shield Toggles",
|
||||
"shield_state",
|
||||
MENU.shield_state as usize,
|
||||
[
|
||||
("None", Shield::None as usize),
|
||||
|
@ -276,10 +288,14 @@ pub unsafe fn write_menu() {
|
|||
].to_vec()
|
||||
);
|
||||
|
||||
// SDI strength
|
||||
|
||||
|
||||
// OnOff flags
|
||||
overall_menu.add_sub_menu_onoff(
|
||||
"Save Damage",
|
||||
"save_damage",
|
||||
MENU.save_damage as usize,
|
||||
(MENU.save_damage as usize & OnOff::On as usize) != 0
|
||||
);
|
||||
overall_menu.add_sub_menu_onoff(
|
||||
"Hitbox Visualization",
|
||||
"hitbox_vis",
|
||||
|
|
Loading…
Reference in a new issue