diff options
| author | Valentin Popov <valentin@popov.link> | 2026-12-02 01:44:35 +0300 |
|---|---|---|
| committer | Valentin Popov <valentin@popov.link> | 2026-12-02 01:44:35 +0300 |
| commit | aaaa7aa0fd045de515079d21eeaf71e0815aa927 (patch) | |
| tree | f666c08f6735c22ed46d4a403b4a174be46bee4e /apps/fparkan-game/src/mission_hints.rs | |
| parent | 905fea2fc8f35992769546aa15649200b3982c4d (diff) | |
| download | fparkan-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.rs | 6 |
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) { |
