Add custom main-menu overlay & input routing
Integrates a PrismaUI full-screen main-menu overlay with input capture and a bridge to the server browser. Adds F4TMainMenuBridge and F4TMainMenuVanillaSettings stubs, exposes Show/Hide/IsMainMenuVisible/IsCustomMenuInputCaptured in F4TPrismaUI, and routes gamepad input via SetMainMenuActive in F4TMenuInput. MainMenuInject implements robust readiness checks with Bink/frame gating and disables legacy multiplayer-row injection (constexpr false). Fixes cursor clipping by clearing RE::MenuCursor constraints each frame and removes unsupported viewport meta from HTML. Adds window.CO_App/handleControllerInput stubs and updates docs/changelog.
This commit is contained in:
+21
-6
@@ -9,6 +9,27 @@ For testing notes, milestone summaries, known issues, and next steps, see [`docs
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
- **Custom main menu overlay**: PrismaUI full-screen overlay of Commonwealth Online main menu (MULTIPLAYER, CREATIONS, SETTINGS, HELP, QUIT) auto-shows on Fallout 4 title screen, replacing the vanilla list menu.
|
||||
- **Main menu input capture**: Keyboard (↑↓ / ENTER / ESC) and gamepad (dpad / A / B) navigation of custom main menu overlay; vanilla menu input is blocked so the underlying CONTINUE/NEW/LOAD/SETTINGS rows remain unreachable.
|
||||
- **Main menu→multiplayer bridge**: MULTIPLAYER item opens server browser overlay (hiding main menu); closing browser returns to main menu.
|
||||
- **Main menu vanilla settings gateway**: SETTINGS → GAME SETTINGS → OPEN FALLOUT 4 SETTINGS calls `openGameSettings` stub (full vanilla settings sub-flow is planned for v1.1).
|
||||
- `F4TMainMenuBridge.cpp` and `F4TMainMenuBridge.h` for main menu↔C++ event routing (controller input logging; full JS dispatch pending).
|
||||
- `F4TMainMenuVanillaSettings.cpp` and `F4TMainMenuVanillaSettings.h` discovery stubs for vanilla settings panel access (ready for GFx work).
|
||||
- `IsMainMenuVisible()`, `ShowMainMenu()`, `HideMainMenu()`, `IsCustomMenuInputCaptured()` public API in F4TPrismaUI.
|
||||
- `SetMainMenuActive(bool)` in F4TMenuInput to route gamepad input to main menu or server browser (active target determines recipient).
|
||||
- Unified pointer mode tracking and mouse/gamepad mode switching for both main menu and server browser overlays (single active menu at a time).
|
||||
|
||||
### Changed
|
||||
- F4TPrismaUI renamed internal globals for clarity: `g_visible` → `g_browserVisible`, `g_domReady` → `g_browserDomReady`, `g_browserMouseCursorVisible` → `g_menuMouseCursorVisible`, `g_browserPreferGamepad` → `g_menuPreferGamepad` (shared across both views).
|
||||
- Multiplayer row injection is now gated behind `constexpr bool kInjectMultiplayerRow = false` in F4TMainMenuInject.cpp. The custom main menu overlay supersedes the injected row; existing code is preserved for v1.1 opt-in.
|
||||
- Controller input dispatch (`ForwardButtonPhase`) now checks active menu (main menu vs server browser) and routes to the appropriate bridge (`MainMenuBridge::ForwardControllerInput` or `ServerBrowserBridge::ForwardControllerInput`).
|
||||
- `IsCustomMenuInputCaptured()` returns true when main menu OR server browser is visible, centralizing the input block guard in MainMenu hooks.
|
||||
- `main-menu/script.js` now includes `window.CO_App` object with `setPointerMode()` for C++ to invoke, and `handleControllerInput()` stub for gamepad dispatch (wired in v1.1 when dispatch is complete).
|
||||
|
||||
### Fixed
|
||||
- Mouse cursor could not move away from the center of the screen while the custom main menu overlay was shown. Root causes: (1) overlay could appear during Please Stand By / intro Binks; (2) vanilla `RE::MenuCursor` min/max bounds were never cleared. Fixed by gating show on intro completion (`PlayBinkMenu` closed, main panel/list visible, `userEngaged`, or short fallback) plus strict `MAIN_STATE` when GFx publishes it; and clearing `MenuCursor` constraints to full window size each frame while the custom menu owns input.
|
||||
|
||||
### Changed
|
||||
- Pause menu settings panel fades and slides in subtly on open and animates out on back (opacity + 10px vertical offset, 220ms ease-out).
|
||||
- Pause menu no longer opens the settings panel automatically on load; the pause screen starts with no menu selection and no sub-view open.
|
||||
@@ -24,12 +45,6 @@ For testing notes, milestone summaries, known issues, and next steps, see [`docs
|
||||
- Main menu prototype menu rows trimmed to MULTIPLAYER, CREATIONS, SETTINGS, HELP, and QUIT (removed CONTINUE, NEW, and LOAD).
|
||||
- Cross-view UI assets consolidated under `ui/views/CommonwealthOnline/shared/` (logo, controller icons). Pause menu, main menu, and server browser now reference `../shared/` instead of per-view icon copies.
|
||||
|
||||
### Added
|
||||
- `ui/sync-shared-assets.bat` to copy `ui/Icons` into `ui/views/CommonwealthOnline/shared/icons/` for local browser preview without a full game deploy.
|
||||
- Reusable settings UI module (`ui/views/CommonwealthOnline/settings/`) with `CO_Settings.create()` API for embedding in pause menu, main menu, or other PrismaUI views.
|
||||
- Plan for opening vanilla Fallout 4 settings from the custom pause UI (`docs/pause-menu-vanilla-settings-plan.md`): hide pause left column, show settings panel only, restore PrismaUI on back.
|
||||
- Settings view on the pause menu prototype (`ui/views/CommonwealthOnline/pause-menu/`) with keyboard navigation, controller prompt bar, and F4SE bridge placeholders.
|
||||
|
||||
### Fixed
|
||||
- Pause menu settings panel fade-in now runs reliably (dedicated `is-open` class with reflow before transition).
|
||||
- Pause menu settings: pause-nav selection bars no longer spill into the settings panel (clip bars in settings mode).
|
||||
|
||||
Reference in New Issue
Block a user