diff --git a/src/menu.rs b/src/menu.rs index dadce7c..3e8af28 100644 --- a/src/menu.rs +++ b/src/menu.rs @@ -66,6 +66,7 @@ pub enum DeathScreenEvent { pub const MENUDEF: &[(&str, MenuAction, MenuType)] = &[ ("✆ Phone", MenuAction::PhoneCall, MenuType::Always), + ("⊙ Time Trial", MenuAction::Race, MenuType::Always), ("✯ Map\n", MenuAction::ToggleMap, MenuType::Always), ("", MenuAction::ToggleAR, MenuType::Always), ("", MenuAction::ChangeARAvatar, MenuType::AROnly), @@ -98,6 +99,7 @@ pub enum MenuType { pub enum MenuAction { ToggleMap, ToggleAR, + Race, ChangeARAvatar, ChangePointer, ModLightAmp, @@ -784,6 +786,11 @@ pub fn handle_input( ew_game.send(GameEvent::SetMenu(Turn::Off)); ew_updatemenu.send(UpdateMenuEvent); } + MenuAction::Race => { + settings.race_active = true; + ew_game.send(GameEvent::SetMenu(Turn::Off)); + ew_updatemenu.send(UpdateMenuEvent); + } MenuAction::ResetSettings => { ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::PowerDown)); *settings = Settings::default(); diff --git a/src/var.rs b/src/var.rs index 7c5e7bb..f71a7b4 100644 --- a/src/var.rs +++ b/src/var.rs @@ -104,6 +104,7 @@ pub struct Settings { pub shadows_sun: bool, pub shadows_pointlights: bool, pub shadowmap_resolution: usize, + pub race_active: bool, pub large_moons: bool, pub key_selectobject: MouseButton, pub key_zoom: MouseButton, @@ -251,6 +252,7 @@ impl Default for Settings { shadows_sun: true, shadows_pointlights: false, shadowmap_resolution: 2048, + race_active: false, large_moons: false, key_selectobject: MouseButton::Left, key_zoom: MouseButton::Right,