diff --git a/README.md b/README.md index 54a3fd2..577cce7 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ Applied, and verified to be the only differences from the stock jar: - `harness/src/spike/` — `HostForHuman` (server + bot, one slot open for a human), `WatchGame` + `TextRenderer` (observer client dumping full text state; the adapter-pattern prototype) -- `spike-webswing/` — Webswing config template and `start.sh` +- `spike-webswing/` — Webswing + MegaMek settings templates, `start.sh` - `patches/` — patchset, archive, patched-jar builder - `scripts/` — `fetch-deps.sh`, `gen-fontconfig.sh` (legacy fontconfig Webswing's toolkit needs), `cdp-screenshot.py`, `summarize.py` diff --git a/TODO.md b/TODO.md index 959910b..ba7aa70 100644 --- a/TODO.md +++ b/TODO.md @@ -22,8 +22,21 @@ between them — basic punctuation (`/ : ,` parens) turns to boxes and the armor pips disappear. Also ruled out earlier: trusting MegaMek's `data/fonts` alone, which removed all font-load rejections but fixed nothing. -**Open fullscreen** — the frame opens small inside a large viewport. Webswing -already passes `webswing.screenWidth`/`screenHeight` to the app JVM. +**Startup layout — done, one gap.** `spike-webswing/clientsettings.xml.template` +is seeded into `mmconf/` on every launch (MegaMek rewrites it on exit, so once is +not enough). Fullscreen works without hardcoding a resolution: a huge stored +window size is clamped by `UIUtil.updateWindowBounds()` to the screen union, +which under Webswing is the browser viewport. The unit display is docked +(`UnitDisplayLocation=1`), the keybinds overlay is off to reclaim map area, and +the minimap is nudged clear of the left panel. + +*The minimap cannot dock* — unlike the unit display and mini report it has no +location preference and is dialog-only. Docking it would need a MegaMek patch. + +*Unverified:* the mini report is set to dock (`MiniReportLocation=1`, the same +0=float/1=dock mechanism as the unit display) but only appears in report phases, +which a headless run cannot reach — no shipped scenario pre-places units, so +deployment always blocks. Confirm during a real match. **Victory drops you** — the host prints a result, sleeps 5s, then kills everything, so the page dies with no summary. Decouple "game over" from "process diff --git a/spike-webswing/clientsettings.xml.template b/spike-webswing/clientsettings.xml.template new file mode 100644 index 0000000..1b569ac --- /dev/null +++ b/spike-webswing/clientsettings.xml.template @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/spike-webswing/start.sh b/spike-webswing/start.sh index 10fa424..8e6e9f6 100755 --- a/spike-webswing/start.sh +++ b/spike-webswing/start.sh @@ -53,6 +53,10 @@ fi # Materialise the Webswing config with absolute paths for this checkout. sed "s|@ROOT@|$ROOT|g" "$ROOT/spike-webswing/webswing.config.template" > "$WS/webswing.config" +# Seed MegaMek's GUI preferences: fullscreen frame, docked unit display and +# report pane. MegaMek rewrites this file on exit, so re-seed every launch. +cp "$ROOT/spike-webswing/clientsettings.xml.template" "$MM/mmconf/clientsettings.xml" + WS_PID="" HOST_PID="" TAIL_PID=""