aboutsummaryrefslogtreecommitdiff
path: root/apps/fparkan-game/src/mission_hints.rs
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-12-02 01:44:35 +0300
committerValentin Popov <valentin@popov.link>2026-12-02 01:44:35 +0300
commitaaaa7aa0fd045de515079d21eeaf71e0815aa927 (patch)
treef666c08f6735c22ed46d4a403b4a174be46bee4e /apps/fparkan-game/src/mission_hints.rs
parent905fea2fc8f35992769546aa15649200b3982c4d (diff)
downloadfparkan-aaaa7aa0fd045de515079d21eeaf71e0815aa927.tar.xz
fparkan-aaaa7aa0fd045de515079d21eeaf71e0815aa927.zip
feat(ui): open mission help and full message history with F1
Diffstat (limited to 'apps/fparkan-game/src/mission_hints.rs')
-rw-r--r--apps/fparkan-game/src/mission_hints.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/fparkan-game/src/mission_hints.rs b/apps/fparkan-game/src/mission_hints.rs
index ac7cb008..47ecc25c 100644
--- a/apps/fparkan-game/src/mission_hints.rs
+++ b/apps/fparkan-game/src/mission_hints.rs
@@ -92,7 +92,7 @@ impl MissionHints {
})
}
- pub(super) fn post(&mut self, index: u32, clock: u32) -> Result<(), String> {
+ pub(super) fn post(&mut self, index: u32, clock: u32) -> Result<(&str, &str), String> {
let messages = self
.messages
.as_ref()
@@ -121,13 +121,13 @@ impl MissionHints {
if sender.is_none() {
eprintln!("sim_coverage mission_text_unavailable=1 sender={sender_id} index={index}");
}
- self.pending = Some(PagerMessage {
+ let pending = self.pending.insert(PagerMessage {
index,
sender: sender.unwrap_or_default(),
body,
posted_ms: clock,
});
- Ok(())
+ Ok((&pending.sender, &pending.body))
}
pub(super) fn toggle_current(&mut self) {