Add pause menu concept prototype
Adds a standalone Commonwealth Online pause menu mockup with the Fallout-style map, left-side navigation, server info, controller prompts, and keyboard handling. Also includes map zoom/pan behavior, fixes the UI scale custom property so sizes resolve correctly, and updates the changelog and dev log.
This commit is contained in:
@@ -7,6 +7,71 @@ failed experiments, successful tests, and next steps.
|
||||
|
||||
---
|
||||
|
||||
## 2026-07-03 - Pause Menu UI Concept Prototype
|
||||
|
||||
### Summary
|
||||
Added a standalone HTML/CSS/JS pause menu concept at `ui/views/CommonwealthOnline/pause-menu/`. Visual mockup of a Fallout 4–styled multiplayer map pause screen with left menu (MAP selected), Commonwealth map background, server info panel, controller prompts, and arrow-key navigation.
|
||||
|
||||
### Files Changed
|
||||
- `ui/views/CommonwealthOnline/pause-menu/index.html`
|
||||
- `ui/views/CommonwealthOnline/pause-menu/styles.css`
|
||||
- `ui/views/CommonwealthOnline/pause-menu/script.js`
|
||||
- `ui/views/CommonwealthOnline/pause-menu/assets/map.png`
|
||||
- `ui/views/CommonwealthOnline/pause-menu/assets/logo.png`
|
||||
- `changelog.md`
|
||||
|
||||
### Details
|
||||
- Map texture from `ui/Assets/WorldMap_Base.png`; logo from `Branding/CommonwealthOnlineLogo.svg`
|
||||
- CSS variables for palette; pseudo-element overlays for vignette, scanlines, and HUD grid
|
||||
- Yellow chevron selection bar on MAP item via `clip-path`
|
||||
- Subtle multiplayer markers (green triangle + amber dots) on map
|
||||
- `script.js`: Up/Down arrows move selection, Enter activates, Escape logs back action
|
||||
|
||||
### Testing
|
||||
- Open `ui/views/CommonwealthOnline/pause-menu/index.html` in a browser at 1920×1080
|
||||
- Verify MAP is selected with yellow bar; arrow keys change selection; map readable but subdued
|
||||
|
||||
### Known Issues
|
||||
- Logo asset is SVG content served as `logo.png` (no raster conversion tool available locally); works in modern browsers and Ultralight
|
||||
- Not yet wired to F4SE/PrismaUI — concept only
|
||||
|
||||
### Next Steps
|
||||
- Integrate into in-game pause flow via PrismaUI_F4 HTML layer
|
||||
- Hook menu actions to C++ plugin callbacks
|
||||
- Replace controller glyph placeholders with platform-specific assets from server browser
|
||||
|
||||
---
|
||||
|
||||
## 2026-07-03 - Pause Menu Layout Bug Fix + Map Zoom/Pan
|
||||
|
||||
### Summary
|
||||
Fixed a real layout bug in the pause menu prototype that made the logo, menu items, and selection bar stretch to fill their containers (looked broken/overlapping in a browser preview smaller than 1920x1080). Also switched the map from a cropped, zoomed-in fit to a full zoomed-out regional view, and added mouse-wheel zoom / click-drag pan on the map as a concept preview of future Fallout 76-style map navigation.
|
||||
|
||||
### Files Changed
|
||||
- `ui/views/CommonwealthOnline/pause-menu/styles.css`
|
||||
- `ui/views/CommonwealthOnline/pause-menu/script.js`
|
||||
- `changelog.md`
|
||||
|
||||
### Details
|
||||
- Root cause: `--co-ui-scale` computed `min(calc(100vw / 1920), calc(100vh / 1080))`, dividing a length (`100vw`) by a bare number (`1920`), which produces another **length**, not a unitless ratio. That length was then mixed with plain numbers (`1`, later `0.5`/`1.6`) inside `min()`/`clamp()` — a CSS type mismatch. Per spec this makes the custom property invalid at the point of substitution, so every `calc(Npx * var(--co-ui-scale))` silently fell back to the property's initial value (`auto`). Because most of those rules were on flex children with default `align-items: stretch`, `auto` widths/heights stretched to fill their flex containers instead of using the intended pixel sizes — explaining the oversized logo, menu rows, and selection bar overlapping other UI.
|
||||
- Fix: divide by a *length* (`calc(100vw / 1920px)`, `calc(100vh / 1080px)`) so the division yields a valid unitless number, confirmed directly in a live browser via CDP (`getComputedStyle`) before and after the change.
|
||||
- Map background changed from `background-size: cover` (+ extra `scale(1.02)`) to `background-size: contain` with a matching dark `background-color` behind the letterboxed edges, showing the full regional map instead of a tightly cropped strip; brightness/contrast/saturation retuned so terrain is more visible while staying muted.
|
||||
- Added mouse-wheel zoom (1x–4x) and click-drag pan on the map in `script.js`, driving shared CSS custom properties (`--map-zoom`, `--map-pan-x/y`) inherited by both the map background and the marker layer so markers stay pinned to the map while navigating. This is a desktop-only concept preview; real control will eventually come from the controller right stick via F4SE.
|
||||
|
||||
### Testing
|
||||
- Verified in a live Chromium tab via CDP (`Runtime.evaluate`/`getComputedStyle`) that `--co-ui-scale` resolved to a real number after the fix (e.g. `0.78125` at a 1500×1266 window) instead of leaving `width` calcs invalid.
|
||||
- Screenshotted the page at a 1500×1266 window and at an emulated 1920×1080 viewport: logo, menu list, selection bar, server panel, and prompt bar all render at their intended compact sizes with no overlap; map shows the full grid-bordered regional area with visible markers.
|
||||
- Not tested inside Ultralight/PrismaUI_F4 — this is a browser-only concept prototype; length/length `calc()` division is standard CSS Values 4 behavior and should carry over, but should be re-verified once wired into the in-game HTML layer.
|
||||
|
||||
### Known Issues
|
||||
- None currently known in the browser-based prototype.
|
||||
|
||||
### Next Steps
|
||||
- Re-verify scale/layout once rendered inside Ultralight (via PrismaUI_F4) rather than only in a standard browser.
|
||||
- Replace the placeholder wheel/drag map navigation with real controller right-stick input once wired to F4SE.
|
||||
|
||||
---
|
||||
|
||||
## 2026-07-02 - DoxyCoSync Comparison Documentation
|
||||
|
||||
### Summary
|
||||
|
||||
Reference in New Issue
Block a user