Assemble the whole cockpit in a single window

The main game window becomes the cockpit shell (enlarged, clipping
children); every display folds in as a chrome-less child pane in the
pod interior arrangement:

  [ MFD UL ] [ MFD UC ] [ MFD UR ]
  [ plasma (reduced) ][ viewscreen (centered) ]
  [ MFD LL ] [   Map  ] [ MFD LR ]

The 3D scene presents into a black STATIC viewscreen child via
Present's hDestWindowOverride (new gMainPresentWindow global) - no
swap-chain changes, and STATIC's transparent hit-testing keeps mouse
input over the 3D view flowing to the game window. MFDSplitView gains a
parent/child mode; PlasmaScreen::Position reparents the glass into the
shell. Main window class background goes black for the cockpit gaps.

Verified by screenshot: live green gauges (LIFT CUT / BOOST / CHUTE /
trigger-program screens) with their red button strips, the 3D canyon in
the centered viewscreen, plasma score glass at its left, map with lit
amber preset lamps - one window, 976x1132 client at 50% scale.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Cyd
2026-07-12 14:52:26 -05:00
co-authored by Claude Fable 5
parent 775ee130a7
commit aa24968c3d
12 changed files with 222 additions and 96 deletions
+27 -12
View File
@@ -64,27 +64,42 @@ namespace
PlasmaScreen *PlasmaScreen::activeInstance = NULL;
void
PlasmaScreen::Position(int x, int y, int client_width, int client_height)
PlasmaScreen::Position(void *parent, int x, int y, int client_width, int client_height)
{
if (activeInstance == NULL || activeInstance->window == NULL)
{
return;
}
DWORD style = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX;
RECT bounds;
bounds.left = 0;
bounds.top = 0;
bounds.right = client_width;
bounds.bottom = client_height;
AdjustWindowRect(&bounds, style, FALSE);
HWND glass = (HWND) activeInstance->window;
int window_w = client_width;
int window_h = client_height;
if (parent != NULL)
{
// fold the glass into the cockpit window as a chrome-less pane
SetWindowLongPtrA(glass, GWL_STYLE, WS_CHILD | WS_VISIBLE);
SetParent(glass, (HWND) parent);
}
else
{
DWORD style = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX;
RECT bounds;
bounds.left = 0;
bounds.top = 0;
bounds.right = client_width;
bounds.bottom = client_height;
AdjustWindowRect(&bounds, style, FALSE);
window_w = bounds.right - bounds.left;
window_h = bounds.bottom - bounds.top;
}
SetWindowPos(
(HWND) activeInstance->window, NULL,
glass, NULL,
x, y,
bounds.right - bounds.left,
bounds.bottom - bounds.top,
SWP_NOZORDER | SWP_NOACTIVATE
window_w,
window_h,
SWP_NOZORDER | SWP_NOACTIVATE | SWP_FRAMECHANGED | SWP_SHOWWINDOW
);
}