WIP time trial: added menu items
This commit is contained in:
parent
624de181ce
commit
71259431eb
|
@ -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();
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue