aboutsummaryrefslogtreecommitdiff
path: root/apps/fparkan-game/src/strategic_view.rs
diff options
context:
space:
mode:
Diffstat (limited to 'apps/fparkan-game/src/strategic_view.rs')
-rw-r--r--apps/fparkan-game/src/strategic_view.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/fparkan-game/src/strategic_view.rs b/apps/fparkan-game/src/strategic_view.rs
index ec40358b..016cf788 100644
--- a/apps/fparkan-game/src/strategic_view.rs
+++ b/apps/fparkan-game/src/strategic_view.rs
@@ -397,9 +397,9 @@ impl StaticVulkanApp {
}
}
}
- if pressed {
+ if event.state == ElementState::Pressed && !self.mission_paused {
match event.physical_key {
- PhysicalKey::Code(KeyCode::Escape) => {
+ PhysicalKey::Code(KeyCode::Escape) if !event.repeat => {
if !self
.overlay
.satellite_map
@@ -420,9 +420,9 @@ impl StaticVulkanApp {
}
}
}
- PhysicalKey::Code(KeyCode::KeyM) => {
+ PhysicalKey::Code(code) => {
if let Some(map) = &mut self.overlay.satellite_map {
- map.toggle();
+ map.handle_key(code, event.repeat);
}
}
_ => {}