aboutsummaryrefslogtreecommitdiff
path: root/apps/fparkan-game/src/mission_notices.rs
diff options
context:
space:
mode:
Diffstat (limited to 'apps/fparkan-game/src/mission_notices.rs')
-rw-r--r--apps/fparkan-game/src/mission_notices.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/apps/fparkan-game/src/mission_notices.rs b/apps/fparkan-game/src/mission_notices.rs
index b633856c..048674fb 100644
--- a/apps/fparkan-game/src/mission_notices.rs
+++ b/apps/fparkan-game/src/mission_notices.rs
@@ -2,6 +2,25 @@ use crate::StaticVulkanApp;
use fparkan_runtime::MissionNotice;
impl StaticVulkanApp {
+ #[cfg(windows)]
+ pub(super) fn present_computer_notice(&mut self, id: u32, clock_ms: u32) {
+ let posted = self
+ .overlay
+ .hints
+ .as_mut()
+ .ok_or_else(|| "pager unavailable".to_string())
+ .and_then(|hints| hints.post_computer(id, clock_ms));
+ let result = posted.and_then(|(sender, body)| {
+ if let Some(help) = &mut self.overlay.help {
+ help.post(sender, body)?;
+ }
+ Ok(())
+ });
+ if let Err(error) = result {
+ eprintln!("computer_notice_unavailable id={id:#06x} reason={error}");
+ }
+ }
+
pub(super) fn present_mission_notice(&mut self, notice: MissionNotice, clock_ms: u32) {
match notice {
MissionNotice::BuildingCaptured { .. } | MissionNotice::VehicleCaptured => {}