Repository navigation
Conversation
Draw every camera in the active region at its real coordinates with a UK-style sign, with or without an active route, from Z2. Replace the bottom strip alert with a compact 156x142 card on the left or right screen edge, shown from 400 m and hidden once passed, so the speed limit stays unobstructed. Settings -> Camera popup offers Off / Left / Right and persists as campopup in prefs.ini, default Left. Markers are filtered by the active region ISO so cameras across a border never appear.
The preview harness zero-initialises prefs, so a missing campopup read as 0 and the popup was suppressed (and Off was unreachable). Encode 0=Left (default), 1=Right, 2=Off so a zero-initialised prefs block still shows the card. The gallery fixture now pins screen/modal and keeps the camera state across draw(), so preview stills show the popup.
Fixes from rendering the previews on real 2.2.6.3 codeRendering the production draw() path with the gallery harness exposed two issues, now fixed in e8bf748:
Also confirmed in the same run: markers render at real atlas coordinates and are iso-filtered, the popup is left-middle by default, and the card clears the speed limit entirely. Reference stills (day, camera-1 scene): marker at the top, popup on the left with "Speed camera / 30" and "200 yd", limit card untouched on the right. |
The translation-coverage test requires every ui_tr() literal to exist in the locale table; the new popup setting introduced three missing keys and failed CI.
build_translations requires identical key sets; adds Left, Right and Camera popup to every language file and refreshes the generated table.
The 142 px card overlapped the Then/next-turn pills at the right edge; offset it 12 px upward so both remain readable.
Restores the existing strip alert and lets the side card use the same camera_visible timing, so both appear and clear together. This also keeps the road-pill contract the native HUD tests assert.
The settings-category test requires every setting to belong to exactly one group; Navigation is the natural home for the alert placement.
|
Thanks for putting this together @bobczan, I appreciate the initiative, though I'm going to pass on this PR rather than merge it as-is. |
What
egion_iso, so cameras across a border never appear.
The popup is suppressed while a menu or modal is open and outside the map screen.
Verification
ound_rect, hud_disc, compact_center).
Not in this PR
Renatka-specific branding and the red-circle limit rendering live in a separate fork branch and are not proposed upstream.
Open question
Should the popup distance threshold stay at 400 m, or follow the existing service range (700 m without a route, 1200 m with one)? I kept 400 m because the card is large and covers part of the map.