tweak key bindings

This commit is contained in:
yuni 2024-04-20 04:48:17 +02:00
parent 0d9bf25f52
commit 115cd1b46d
4 changed files with 13 additions and 8 deletions

View file

@ -43,10 +43,10 @@ Links:
- Tab: Toggle HUD/AR
- F11: Toggle fullscreen
- F: Toggle 3rd person view
- \`: Toggle map
- M: Toggle map
- Y: Toggle rotation stabilizer
- T: Toggle music
- M: Toggle sound effects
- F4: Toggle music
- F3: Toggle sound effects
- Cheats
- G: Toggle god mode / cheats
- V/B: Impossible acceleration forward/backward

View file

@ -137,12 +137,12 @@ pub fn toggle_bgm(
mut evwriter_sfx: EventWriter<PlaySfxEvent>,
mut settings: ResMut<var::Settings>,
) {
if keyboard_input.just_pressed(KeyCode::KeyT) {
if keyboard_input.just_pressed(settings.key_toggle_music) {
settings.mute_music ^= true;
evwriter_sfx.send(PlaySfxEvent(Sfx::Click));
evwriter_toggle.send(ToggleMusicEvent());
}
if keyboard_input.just_pressed(KeyCode::KeyM) {
if keyboard_input.just_pressed(settings.key_toggle_sfx) {
settings.mute_sfx ^= true;
evwriter_sfx.send(PlaySfxEvent(Sfx::Click));
evwriter_toggle.send(ToggleMusicEvent());

View file

@ -3,10 +3,11 @@ C: Impossibly instant stopping [CHEAT]
Shift+V/B: Same as V/B, but a thousand times faster [CHEAT]
V/B: Impossible acceleration forward/backward [CHEAT]
G: Toggle god mode / cheats [CHEAT]
M: Toggle sound effects
T: Toggle music
M: Toggle map
Y: Toggle rotation stabilizer
F: Toggle 3rd person view
F3: Toggle sound effects
F4: Toggle music
F11: Toggle fullscreen
Tab: Toggle HUD + Augmented Reality
Right click: Zoom [AUGMENTED REALITY ONLY]

View file

@ -76,6 +76,8 @@ pub struct Settings {
pub key_mouseright: KeyCode,
pub key_rotateleft: KeyCode,
pub key_rotateright: KeyCode,
pub key_toggle_sfx: KeyCode,
pub key_toggle_music: KeyCode,
pub key_reply1: KeyCode,
pub key_reply2: KeyCode,
pub key_reply3: KeyCode,
@ -155,7 +157,7 @@ impl Default for Settings {
rotation_stabilizer_active: true,
key_selectobject: MouseButton::Left,
key_zoom: MouseButton::Right,
key_map: KeyCode::Backquote,
key_map: KeyCode::KeyM,
key_map_zoom_out: KeyCode::ShiftLeft,
key_map_zoom_in: KeyCode::ControlLeft,
//key_map_zoom_out_wheel: KeyCode::Shift,
@ -184,6 +186,8 @@ impl Default for Settings {
key_mouseright: KeyCode::KeyL,
key_rotateleft: KeyCode::KeyU,
key_rotateright: KeyCode::KeyO,
key_toggle_sfx: KeyCode::F3,
key_toggle_music: KeyCode::F4,
key_reply1: KeyCode::Digit1,
key_reply2: KeyCode::Digit2,
key_reply3: KeyCode::Digit3,