ui: title caption 'high tech · low life'; overlay hint reads 'd overlay'

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Jeffrey Wilcke
2026-10-12 22:22:15 +02:00
parent 0122130f5b
commit e235d8012b
2 changed files with 9 additions and 3 deletions

View File

@@ -495,10 +495,10 @@ impl Screen for MapScreen {
let jacked = st.player.as_ref().is_some_and(|p| p.jacked_in());
let hints = match (self.mode, jacked) {
(Mode::Explore, _) => {
"hjkl pan · [] level · w walk · d net · e legend · s save · ? keys"
"hjkl pan · [] level · w walk · d overlay · e legend · s save · ? keys"
}
(Mode::Walk, true) => {
"⚡ jacked in · hjkl move · enter jack out · tab camera · d net · ? keys"
"⚡ jacked in · hjkl move · enter jack out · tab camera · d overlay · ? keys"
}
(Mode::Walk, false) => "hjkl move · <> stairs · enter jack in · tab camera · ? keys",
};
@@ -719,6 +719,7 @@ mod tests {
let text = buffer_text(t.backend().buffer());
assert!(text.contains("jack out"), "{text}");
assert!(text.contains("jacked in"), "{text}");
assert!(text.contains("d overlay"), "{text}");
// The body shows on the Street while the avatar is in the Net.
s.mode = Mode::Explore;
s.stratum = StratumKind::Street;

View File

@@ -15,7 +15,7 @@ use ratatui::text::Span;
use ratatui::widgets::{Paragraph, Widget};
pub const TITLE: &str = "CYBERPUNK";
const SUBTITLE: &str = "c i t y g e n e r a t o r";
const SUBTITLE: &str = "h i g h t e c h · l o w l i f e";
pub struct Title {
menu: Menu,
@@ -147,6 +147,11 @@ mod tests {
"{text}"
);
assert!(text.contains('█'));
st.tick = 600;
t.draw(|f| title.draw(&st, f)).unwrap();
let text = buffer_text(t.backend().buffer());
assert!(text.contains("h i g h t e c h"), "{text}");
assert!(!text.contains("g e n e r a t o r"), "{text}");
assert!(matches!(
title.update(&mut st, &[key(KeyCode::Char('q'))]),
ScreenCmd::Quit