Skip to content

chore(overlay): ship a version pill only, with F8 to hide it - #7

Open
Frostn1 wants to merge 1 commit into
mainfrom
chore/overlay-version-pill
Open

chore(overlay): ship a version pill only, with F8 to hide it#7
Frostn1 wants to merge 1 commit into
mainfrom
chore/overlay-version-pill

Conversation

@Frostn1

@Frostn1 Frostn1 commented Aug 9, 2026

Copy link
Copy Markdown
Owner

What

FrostMod's in-game overlay is now just a version pill, with F8 to hide it.

Before, the overlay was an F8 action menu plus four modal panels (bike model swap, track manager, track switcher, direct connect) and a radar/rider-outline HUD, all mirrored across two render paths. Bike model swaps are the MXB App's job — the in-game panel was a second way to do the same thing.

The pill

Shows When
FrostMod v0.11.0 - attached idle
/ Reloading mods... 60% + progress bar while a reload runs
a status line briefly, e.g. the MXB App asking you to re-select a bike

F8 hides and shows it, and is now the only key FrostMod reads anywhere — no digits, arrows, Enter/Esc or PageUp/PageDown — so it can't shadow a game binding or race another HUD plugin for a keystroke. Hidden means hidden: a reload in progress doesn't force it back.

How

A single compile-time switch, FROSTMOD_UI, at the top of src/frostmod.cpp0 ships, 1 restores the previous build verbatim. Every menu, panel, HUD renderer and keyboard block sits behind it. The diff is almost entirely #if markers; no feature code was deleted.

Both render paths — the GL wglSwapBuffers fallback and the sanctioned PiBoSo Draw() callback — are gated together, so they can never disagree and produce a double image.

Not changed

  • Reload from R in frostmod.exe and from Local\FrostModReload (the MXB App's path).
  • The Local\FrostModCommand channel (refresh_bike_model) — the app's instant model refresh keeps working.
  • The model-swap engine and its FrostMod Models library layout.
  • The plugin data callbacks feeding the radar snapshot.

Verification

The preprocessor was emulated over the real file for both switch values:

  • FROSTMOD_UI 0 — braces/parens balance; no gated symbol referenced by ungated code; exactly one GetAsyncKeyState in the whole translation unit (the F8 toggle).
  • FROSTMOD_UI 1 — balances, 15 key reads, menu branch chain intact. The restore path works.

RadValidateVP and kTrkVisible are now defined but unreferenced in the shipped build — not dangling references, and there's no /W4 or /WX in CMakeLists.txt, so they're silent.

The DLL is MSVC + MinHook + Win32 and can't be built on macOS, so CI on windows-latest is the compile check for this PR.

To check in game

  1. Pill appears top-left with the right version.
  2. F8 hides / restores it; frostmod.log shows [overlay] pill hidden/shown (F8).
  3. An MXB App reload animates the progress bar, then returns to the version text.
  4. On track (plugin mode) vs. in menus — same pill, never doubled.

Plan kept in tasks/overlay-version-pill.md.

No DB/schema surface in this repo.

🤖 Generated with Claude Code

- Add a single compile-time switch, FROSTMOD_UI (0 = the shipped pill-only build,
  1 = the full UI), at the top of src/frostmod.cpp. Every menu, panel, HUD renderer
  and keyboard block sits behind it, so flipping it back to 1 restores the previous
  build verbatim. No feature code was deleted.
- In game FrostMod now draws exactly one thing: a top-left pill reading
  "FrostMod v0.11.0 - attached", which becomes the spinner + percent + progress bar
  while a reload runs and shows a status line when one is set. Both render paths
  emit it - the GL wglSwapBuffers fallback and the sanctioned PiBoSo Draw()
  callback - and they are gated together so they can never disagree.
- F8 hides and shows the pill, and is now the ONLY key FrostMod reads: no digits,
  arrows, Enter/Esc or PageUp/PageDown are polled, so it cannot shadow a game
  binding or race another HUD plugin for a keystroke. Hidden means hidden - a
  reload in progress does not force the pill back on screen.
- Gone from the screen: the F8 menu; the bike model swap, track manager, track
  switcher and direct connect panels; the radar disc and rider outlines. Bike
  model swaps are the MXB App's job - the in-game panel was a second way to do
  the same thing.
- The FEATURES behind those panels are untouched and still compiled in. Reload
  still runs from R in frostmod.exe and from Local\FrostModReload (the MXB App's
  path); the Local\FrostModCommand channel (refresh_bike_model) is unaffected, so
  the app's instant model refresh keeps working; the model-swap engine and its
  "FrostMod Models" library layout are unchanged; and the plugin data callbacks
  keep feeding the radar snapshot.
- Scrub the stale F8 advice from the launcher console, the [init] / [trklib] log
  lines, README.md, docs/USAGE.md and docs/PLUGIN.md; each now notes which
  behaviour needs a FROSTMOD_UI 1 build.
- CHANGELOG.md updated; plan kept in tasks/overlay-version-pill.md.

Verified by emulating the preprocessor over the real file for both switch values:
UI=0 balances, references no gated symbol, and leaves exactly one GetAsyncKeyState
in the translation unit (the F8 toggle); UI=1 balances and restores the full input
handling. The DLL is MSVC/Win32 and cannot be built on macOS - ci.yml compiles it
on windows-latest for this PR.

No DB/schema surface in this repo.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant