1920x1080 internal cockpit canvas with pod-bezel occlusion
The cockpit is now a fixed 1920x1080 canvas (uniformly scaled down on
smaller monitors, min 25%):
[ MFD UL 640 ][ MFD UC 640 ][ MFD UR 640 ] <- native glass, 1920 wide
[ viewscreen 800x600 centered ]
[ MFD LL ] [ Map ] [ MFD LR ] <- bottom edge
Playtest direction: the original pods MFDs partially occluded the main
display, and that is used here on purpose - the panes overlap the
viewscreen and render over it (viewscreen pinned to the bottom of the
sibling z-order, WS_CLIPSIBLINGS everywhere, so the 3D present clips
around every pane). Top-row glasses are gauge-canvas native 640x480 -
three across is exactly 1920. Red MFD buttons at half height; the amber
map columns stack contiguous like the pod strips. The auto-fit
scale/L4MFDSCALE machinery is gone - the canvas is the design space.
Verified live at 100% scale: contiguous native top row over the
centered viewscreen, bottom cluster overlapping its lower edge, map and
gauges updating (BOOST values moving, presets lit).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+23
-10
@@ -165,8 +165,9 @@ MFDSplitView::MFDSplitView(
|
||||
|
||||
if (parent != NULL)
|
||||
{
|
||||
// chrome-less pane inside the cockpit window
|
||||
style = WS_CHILD | WS_VISIBLE;
|
||||
// chrome-less pane inside the cockpit window; clips siblings so
|
||||
// overlapping panes and the viewscreen never paint over it
|
||||
style = WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS;
|
||||
window_w = client_width;
|
||||
window_h = client_height;
|
||||
}
|
||||
@@ -253,9 +254,9 @@ void
|
||||
// 4 buttons above the glass, 4 below; RIO addresses descend
|
||||
// from the anchor, row-major (vRIO CockpitLayout::Mfd).
|
||||
//-----------------------------------------------------------
|
||||
int strip_h = display_height / 8;
|
||||
if (strip_h < 18) strip_h = 18;
|
||||
if (strip_h > 40) strip_h = 40;
|
||||
int strip_h = display_height / 16;
|
||||
if (strip_h < 9) strip_h = 9;
|
||||
if (strip_h > 20) strip_h = 20;
|
||||
|
||||
int button_w = (display_width - 5 * buttonGap) / 4;
|
||||
|
||||
@@ -279,15 +280,16 @@ void
|
||||
else if (button_style == SideColumns)
|
||||
{
|
||||
//-----------------------------------------------------------
|
||||
// 6 buttons down each side of the glass (the pod wires only
|
||||
// 6 of each column's 8 addresses to buttons; the rest are
|
||||
// Tesla relays). Left = anchorA ascending, right = anchorB.
|
||||
// 6 buttons down each side of the glass, stacked contiguous
|
||||
// like the pod's strips (the pod wires only 6 of each
|
||||
// column's 8 addresses to buttons; the rest are Tesla
|
||||
// relays). Left = anchorA ascending, right = anchorB.
|
||||
//-----------------------------------------------------------
|
||||
int col_w = display_width / 8;
|
||||
if (col_w < 20) col_w = 20;
|
||||
if (col_w > 40) col_w = 40;
|
||||
|
||||
int button_h = (display_height - 7 * buttonGap) / 6;
|
||||
int button_h = display_height / 6;
|
||||
|
||||
displayX = col_w + 2 * buttonGap;
|
||||
*client_width = display_width + 2 * (col_w + 2 * buttonGap);
|
||||
@@ -298,7 +300,7 @@ void
|
||||
left->unit = anchorA + i;
|
||||
left->amber = 1;
|
||||
left->x = buttonGap;
|
||||
left->y = buttonGap + i * (button_h + buttonGap);
|
||||
left->y = i * button_h;
|
||||
left->w = col_w;
|
||||
left->h = button_h;
|
||||
|
||||
@@ -397,6 +399,17 @@ void
|
||||
// one message per frame, and queued WM_PAINTs (lowest priority) starve
|
||||
// behind it - panes would freeze on their first frame.
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
void
|
||||
MFDSplitView::SetPosition(int x, int y)
|
||||
{
|
||||
Check_Pointer(this);
|
||||
if (window != NULL)
|
||||
{
|
||||
SetWindowPos((HWND) window, NULL, x, y, 0, 0,
|
||||
SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MFDSplitView::Repaint()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user