Skip to main content

pixelcoords_core/
strings.rs

1//! User-facing overlay strings. Everything the overlay renders as text
2//! comes from here so a language table can replace `EN` later without a
3//! refactor. ASCII only — the embedded font covers printable ASCII.
4
5/// One control-panel row: a short key column and what the key does.
6pub type HintRow = (&'static str, &'static str);
7
8#[derive(Debug, Clone, Copy)]
9pub struct Strings {
10    /// The marking controls, shown while not editing a label.
11    pub hud_hint_rows: &'static [HintRow],
12    /// The label editor's controls.
13    pub hud_edit_rows: &'static [HintRow],
14    pub hud_saved_prefix: &'static str,
15    pub hud_save_failed_prefix: &'static str,
16    pub hud_quit_unsaved: &'static str,
17    /// Closing a window that still holds marks. The count goes between the
18    /// two halves; deleting stays an explicit act, so this refuses rather
19    /// than offering to discard.
20    pub hud_release_blocked_prefix: &'static str,
21    pub hud_release_blocked_suffix: &'static str,
22    /// A window closed while others remain: that display is live again.
23    pub hud_released: &'static str,
24    /// Edge snapping toggled on or off for the rest of the run.
25    pub hud_snap_on: &'static str,
26    pub hud_snap_off: &'static str,
27    /// The panel row's key column for the snap toggle, and the two states
28    /// its action column shows.
29    pub hud_snap_row_key: &'static str,
30    pub hud_snap_row_on: &'static str,
31    pub hud_snap_row_off: &'static str,
32}
33
34pub const EN: Strings = Strings {
35    hud_hint_rows: &[
36        ("drag", "draw / move / resize"),
37        ("Shift", "lock ratio / 15 turns"),
38        ("Q E", "rotate"),
39        ("W", "tool"),
40        ("A", "label"),
41        ("S", "save"),
42        ("D", "delete"),
43        ("Z", "undo / Shift redo"),
44        ("C", "cycle overlap"),
45        ("Alt+drag", "duplicate"),
46        ("arrows", "nudge (Shift 10, Alt size)"),
47        ("M", "hold: loupe"),
48        ("N", "name session"),
49        ("X", "edge snap"),
50        ("R", "release monitor"),
51        ("3-9", "polygon sides"),
52        ("Space", "hold: move panel"),
53        ("H", "hide panel"),
54        ("Esc", "quit"),
55    ],
56    hud_edit_rows: &[("type", "text"), ("Enter", "commit"), ("Esc", "cancel")],
57    hud_saved_prefix: "Saved ",
58    hud_save_failed_prefix: "Save failed: ",
59    hud_quit_unsaved: "Unsaved work - S saves, Esc again quits",
60    hud_release_blocked_prefix: "Monitor holds ",
61    hud_release_blocked_suffix: " selections - delete them first",
62    hud_released: "Monitor released",
63    hud_snap_on: "SNAP ON",
64    hud_snap_off: "SNAP OFF",
65    hud_snap_row_key: "X",
66    hud_snap_row_on: "edge snap: on",
67    hud_snap_row_off: "edge snap: off",
68};