M5/HUD-1: dynamic HUD — minimap visibility rules, clock position, health/armor bars, money fade, aim-only crosshair #33

Closed
opened 2026-11-30 16:22:25 +00:00 by opencode · 1 comment
Owner

From the maintainer's roadmap (#29, M5). Branch: master (GTA III).

Requirements (as specified):

  • Minimap visible only while in a car, toggleable via hotkey; but always visible while a mission marker or waypoint is active. Position bottom-left, square if possible.
  • Clock moves to the top-right.
  • Health and armor become bars (length = the minimap square's), placed near the minimap; visible only on damage/replenish, fading otherwise.
  • Money display semi-transparent top-left, solidifying on change.
  • Crosshair only visible while aiming (right mouse button held).

Codebase pointers: src/renderer/Hud.cpp (CHud::Draw — the element drawing/visibility lives here), src/core/Frontend.cpp (settings toggles), src/core/Pad.cpp (hotkey wiring), src/core/config.h (optional-feature defines — check the IMPROVED_*/NEW_* convention and gate everything behind a single new define, e.g. HUD_REWORK, default off in vanilla-identical builds).

Provenance framing: HUD behavior changes are custom code → everything behind the new config guard; vanilla default unchanged. Art: reuse existing HUD sprites; a square minimap may need a frontend texture — flag if so (asset-dependent item then).

Acceptance: with the guard ON all specified behaviors hold; guard OFF = byte-identical vanilla HUD; both build green; settings hotkey documented in the debug menu/frontend options.

From the maintainer's roadmap (#29, M5). **Branch: master (GTA III).** **Requirements (as specified):** - Minimap visible only while in a car, toggleable via hotkey; but always visible while a mission marker or waypoint is active. Position bottom-left, square if possible. - Clock moves to the top-right. - Health and armor become **bars** (length = the minimap square's), placed near the minimap; visible only on damage/replenish, fading otherwise. - Money display semi-transparent top-left, solidifying on change. - Crosshair only visible while aiming (right mouse button held). **Codebase pointers:** `src/renderer/Hud.cpp` (`CHud::Draw` — the element drawing/visibility lives here), `src/core/Frontend.cpp` (settings toggles), `src/core/Pad.cpp` (hotkey wiring), `src/core/config.h` (optional-feature defines — check the `IMPROVED_*`/`NEW_*` convention and gate everything behind a single new define, e.g. `HUD_REWORK`, default off in vanilla-identical builds). **Provenance framing:** HUD behavior changes are custom code → everything behind the new config guard; vanilla default unchanged. Art: reuse existing HUD sprites; a square minimap may need a frontend texture — flag if so (asset-dependent item then). **Acceptance:** with the guard ON all specified behaviors hold; guard OFF = byte-identical vanilla HUD; both build green; settings hotkey documented in the debug menu/frontend options.
opencode added this to the M5: GTA III modernization features (#29 roadmap) milestone 2026-11-30 16:22:25 +00:00
opencode added the graphicsenhancement labels 2026-11-30 16:22:26 +00:00
Author
Owner

RESOLVED 2026-11-30 — published on master in two commits (the feature + the review-fix round), reviewed fix-then-ship with all findings addressed.

Published:

  1. feat: dynamic HUD rework behind HUD_REWORK — minimap rules, bars, money fade, aim crosshair — the guarded rework (~170 lines, Hud.cpp + config.h): vehicle-only minimap with hotkey toggle and blip override, top-right clock, health/armour change-flash bars under the radar, money top-left with change-fade, aim-only crosshair.
  2. fix: HUD rework review fixes — F10 toggle, mission entity blips, clock inset, docs — the review round: F10 toggle (exhaustive key-sweep verified unbound — the original F12 choice collided with the live screenshot binding), mission entity blips (BLIP_CAR/CHAR/OBJECT) now force the minimap visible with BLIP_DISPLAY_NEITHER honored (coarse any-visible-blip rule — justified: sRadarTrace carries no objective flag), clock moved to the vanilla-proven 111 inset (clear of the weapon icon), money kept top-left (only transient pager/help overlays collide — documented), corrected toggle-semantics comment, the HUD rework (F10) read-only debug-menu entry, and the bar max named.

Review confirmations on record: guard-off vanilla behavior is precedence-identical at both re-parenthesized conditions; all original lines intact in the unguarded arms; bars/crosshair/fade logic verified correct; first-person scopes untouched.

Scope note — square minimap (deferred, asset-dependent): the stock radar is the round HUD_RADARDISC sprite; a true square needs new frontend art/TXD masking in gamefiles/ (same class as the ped-model work in #38). The behavioral rework ships on the existing round radar.

Maintainer in-game checklist (guard ON = uncomment HUD_REWORK): on foot → minimap hidden; enter car → appears; F10 toggles in-car display; waypoint/mission blip → forced visible even on foot; damage/heal → bars flash ~4 s under the radar; money → solid ~3 s on change then fades to ~43%; clock → top-right left of the weapon icon; crosshair → only while aiming (RMB). Guard OFF = stock HUD.

**RESOLVED 2026-11-30 — published on master in two commits** (the feature + the review-fix round), reviewed fix-then-ship with all findings addressed. **Published:** 1. `feat: dynamic HUD rework behind HUD_REWORK — minimap rules, bars, money fade, aim crosshair` — the guarded rework (~170 lines, `Hud.cpp` + `config.h`): vehicle-only minimap with hotkey toggle and blip override, top-right clock, health/armour change-flash bars under the radar, money top-left with change-fade, aim-only crosshair. 2. `fix: HUD rework review fixes — F10 toggle, mission entity blips, clock inset, docs` — the review round: **F10** toggle (exhaustive key-sweep verified unbound — the original F12 choice collided with the live screenshot binding), mission **entity blips** (`BLIP_CAR/CHAR/OBJECT`) now force the minimap visible with `BLIP_DISPLAY_NEITHER` honored (coarse any-visible-blip rule — justified: `sRadarTrace` carries no objective flag), clock moved to the vanilla-proven 111 inset (clear of the weapon icon), money kept top-left (only transient pager/help overlays collide — documented), corrected toggle-semantics comment, the `HUD rework (F10)` read-only debug-menu entry, and the bar max named. **Review confirmations on record:** guard-off vanilla behavior is precedence-identical at both re-parenthesized conditions; all original lines intact in the unguarded arms; bars/crosshair/fade logic verified correct; first-person scopes untouched. **Scope note — square minimap (deferred, asset-dependent):** the stock radar is the round `HUD_RADARDISC` sprite; a true square needs new frontend art/TXD masking in `gamefiles/` (same class as the ped-model work in #38). The behavioral rework ships on the existing round radar. **Maintainer in-game checklist (guard ON = uncomment `HUD_REWORK`):** on foot → minimap hidden; enter car → appears; **F10** toggles in-car display; waypoint/mission blip → forced visible even on foot; damage/heal → bars flash ~4 s under the radar; money → solid ~3 s on change then fades to ~43%; clock → top-right left of the weapon icon; crosshair → only while aiming (RMB). Guard OFF = stock HUD.
Sign in to join this conversation.