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:
@@ -2,7 +2,6 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Commonwealth Online</title>
|
||||
<link rel="stylesheet" href="./styles.css">
|
||||
</head>
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Commonwealth Online — Main Menu</title>
|
||||
<link rel="stylesheet" href="styles.css">
|
||||
<link rel="stylesheet" href="../settings/settings.css">
|
||||
|
||||
@@ -17,6 +17,35 @@
|
||||
}
|
||||
};
|
||||
|
||||
// ── Pointer mode API for C++ invocation ─────────────────────────
|
||||
window.CO_App = {
|
||||
setPointerMode: function (mode) {
|
||||
console.log("[CO Main Menu] Pointer mode:", mode);
|
||||
}
|
||||
};
|
||||
|
||||
// ── Controller input handler ─────────────────────────────────────
|
||||
window.handleControllerInput = function (button, phase) {
|
||||
if (phase === "down") {
|
||||
switch (button) {
|
||||
case "dpad_up":
|
||||
moveSelection(-1);
|
||||
break;
|
||||
case "dpad_down":
|
||||
moveSelection(1);
|
||||
break;
|
||||
case "a":
|
||||
activateSelected();
|
||||
break;
|
||||
case "b":
|
||||
if (viewMode === "settings") {
|
||||
exitSettingsMode();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// ── Compute UI scale ───────────────────────────────────────────
|
||||
function updateScale() {
|
||||
var MIN_SCALE = 0.5;
|
||||
|
||||
Reference in New Issue
Block a user