clean up menu

This commit is contained in:
yuni 2024-09-22 16:21:18 +02:00
parent 18b1d6feae
commit ef7aae7201

View file

@ -63,9 +63,9 @@ pub enum DeathScreenEvent {
} }
pub const MENUDEF: &[(&str, MenuAction)] = &[ pub const MENUDEF: &[(&str, MenuAction)] = &[
("", MenuAction::ToggleMap),
("", MenuAction::ToggleAR), ("", MenuAction::ToggleAR),
("", MenuAction::ChangeARAvatar), ("", MenuAction::ChangeARAvatar),
("", MenuAction::ToggleMap),
("", MenuAction::ModLightAmp), ("", MenuAction::ModLightAmp),
("", MenuAction::ModFlashlightPower), ("", MenuAction::ModFlashlightPower),
("", MenuAction::ModThrusterBoost), ("", MenuAction::ModThrusterBoost),
@ -73,8 +73,8 @@ pub const MENUDEF: &[(&str, MenuAction)] = &[
("", MenuAction::ToggleSound), ("", MenuAction::ToggleSound),
("", MenuAction::ToggleMusic), ("", MenuAction::ToggleMusic),
("", MenuAction::ToggleCamera), ("", MenuAction::ToggleCamera),
("Toggle Fullscreen [F11]", MenuAction::ToggleFullscreen),
("", MenuAction::ToggleShadows), ("", MenuAction::ToggleShadows),
("Fullscreen [F11]", MenuAction::ToggleFullscreen),
("Take Off Helmet", MenuAction::Restart), ("Take Off Helmet", MenuAction::Restart),
("Quit", MenuAction::Quit), ("Quit", MenuAction::Quit),
]; ];
@ -475,7 +475,7 @@ pub fn update_menu(
} else { } else {
&settings.noise_cancellation_modes[0] &settings.noise_cancellation_modes[0]
}; };
text.sections[i].value = format!("Noise Cancellation: {noisecancel}\n"); text.sections[i].value = format!("\nNoise Cancellation: {noisecancel}\n");
} }
MenuAction::ToggleMusic => { MenuAction::ToggleMusic => {
let station = let station =
@ -494,7 +494,7 @@ pub fn update_menu(
} }
MenuAction::ModLightAmp => { MenuAction::ModLightAmp => {
let p = actor::POWER_DRAIN_LIGHTAMP[prefs.light_amp] / 1e3; let p = actor::POWER_DRAIN_LIGHTAMP[prefs.light_amp] / 1e3;
text.sections[i].value = format!("Light Amplification: {p}kW\n"); text.sections[i].value = format!("\nLight Amplification: {p}kW\n");
} }
MenuAction::ModFlashlightPower => { MenuAction::ModFlashlightPower => {
let p = actor::POWER_DRAIN_FLASHLIGHT[prefs.flashlight_power] / 1e3; let p = actor::POWER_DRAIN_FLASHLIGHT[prefs.flashlight_power] / 1e3;
@ -538,13 +538,13 @@ pub fn update_menu(
} else { } else {
"1st Person" "1st Person"
}; };
text.sections[i].value = format!("Camera: {onoff} [C]\n"); text.sections[i].value = format!("\nCamera: {onoff} [C]\n");
} }
MenuAction::ToggleShadows => { MenuAction::ToggleShadows => {
let onoff = if settings.shadows_sun { let onoff = if settings.shadows_sun {
"Flashlight + Sun" "High"
} else { } else {
"Flashlight Only" "Low"
}; };
text.sections[i].value = format!("Shadows: {onoff}\n"); text.sections[i].value = format!("Shadows: {onoff}\n");
} }