Panes flush to their edges - no black border against the viewscreen
The 4-8px black padding framing every MFD and the map read as a jarring border over the 3D. Glass and button strips now run to the pane edges (last button in each strip/column absorbs the rounding remainder); only the thin separations between buttons within a strip remain. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+24
-17
@@ -251,17 +251,19 @@ void
|
|||||||
if (button_style == MFDStrips)
|
if (button_style == MFDStrips)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------
|
//-----------------------------------------------------------
|
||||||
// 4 buttons above the glass, 4 below; RIO addresses descend
|
// 4 buttons above the glass, 4 below, flush to the pane
|
||||||
// from the anchor, row-major (vRIO CockpitLayout::Mfd).
|
// edges (no border against the viewscreen behind); RIO
|
||||||
|
// addresses descend from the anchor, row-major (vRIO
|
||||||
|
// CockpitLayout::Mfd).
|
||||||
//-----------------------------------------------------------
|
//-----------------------------------------------------------
|
||||||
int strip_h = display_height / 8;
|
int strip_h = display_height / 8;
|
||||||
if (strip_h < 18) strip_h = 18;
|
if (strip_h < 18) strip_h = 18;
|
||||||
if (strip_h > 40) strip_h = 40;
|
if (strip_h > 40) strip_h = 40;
|
||||||
|
|
||||||
int button_w = (display_width - 5 * buttonGap) / 4;
|
int button_w = (display_width - 3 * buttonGap) / 4;
|
||||||
|
|
||||||
displayY = strip_h + 2 * buttonGap;
|
displayY = strip_h;
|
||||||
*client_height = display_height + 2 * (strip_h + 2 * buttonGap);
|
*client_height = display_height + 2 * strip_h;
|
||||||
|
|
||||||
for (int i = 0; i < 8; ++i)
|
for (int i = 0; i < 8; ++i)
|
||||||
{
|
{
|
||||||
@@ -271,9 +273,11 @@ void
|
|||||||
ScreenButton *button = &buttons[buttonCount++];
|
ScreenButton *button = &buttons[buttonCount++];
|
||||||
button->unit = anchorA - i;
|
button->unit = anchorA - i;
|
||||||
button->amber = 0;
|
button->amber = 0;
|
||||||
button->x = buttonGap + col * (button_w + buttonGap);
|
button->x = col * (button_w + buttonGap);
|
||||||
button->y = row ? (displayY + displayH + buttonGap) : buttonGap;
|
button->y = row ? (displayY + displayH) : 0;
|
||||||
button->w = button_w;
|
button->w = (col == 3)
|
||||||
|
? (display_width - 3 * (button_w + buttonGap))
|
||||||
|
: button_w;
|
||||||
button->h = strip_h;
|
button->h = strip_h;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -281,9 +285,10 @@ void
|
|||||||
{
|
{
|
||||||
//-----------------------------------------------------------
|
//-----------------------------------------------------------
|
||||||
// 6 buttons down each side of the glass, stacked contiguous
|
// 6 buttons down each side of the glass, stacked contiguous
|
||||||
// like the pod's strips (the pod wires only 6 of each
|
// and flush to the pane edges, like the pod's strips (the
|
||||||
// column's 8 addresses to buttons; the rest are Tesla
|
// pod wires only 6 of each column's 8 addresses to buttons;
|
||||||
// relays). Left = anchorA ascending, right = anchorB.
|
// the rest are Tesla relays). Left = anchorA ascending,
|
||||||
|
// right = anchorB.
|
||||||
//-----------------------------------------------------------
|
//-----------------------------------------------------------
|
||||||
int col_w = display_width / 8;
|
int col_w = display_width / 8;
|
||||||
if (col_w < 20) col_w = 20;
|
if (col_w < 20) col_w = 20;
|
||||||
@@ -291,26 +296,28 @@ void
|
|||||||
|
|
||||||
int button_h = display_height / 6;
|
int button_h = display_height / 6;
|
||||||
|
|
||||||
displayX = col_w + 2 * buttonGap;
|
displayX = col_w;
|
||||||
*client_width = display_width + 2 * (col_w + 2 * buttonGap);
|
*client_width = display_width + 2 * col_w;
|
||||||
|
|
||||||
for (int i = 0; i < 6; ++i)
|
for (int i = 0; i < 6; ++i)
|
||||||
{
|
{
|
||||||
|
int h = (i == 5) ? (display_height - 5 * button_h) : button_h;
|
||||||
|
|
||||||
ScreenButton *left = &buttons[buttonCount++];
|
ScreenButton *left = &buttons[buttonCount++];
|
||||||
left->unit = anchorA + i;
|
left->unit = anchorA + i;
|
||||||
left->amber = 1;
|
left->amber = 1;
|
||||||
left->x = buttonGap;
|
left->x = 0;
|
||||||
left->y = i * button_h;
|
left->y = i * button_h;
|
||||||
left->w = col_w;
|
left->w = col_w;
|
||||||
left->h = button_h;
|
left->h = h;
|
||||||
|
|
||||||
ScreenButton *right = &buttons[buttonCount++];
|
ScreenButton *right = &buttons[buttonCount++];
|
||||||
right->unit = anchorB + i;
|
right->unit = anchorB + i;
|
||||||
right->amber = 1;
|
right->amber = 1;
|
||||||
right->x = displayX + displayW + buttonGap;
|
right->x = displayX + displayW;
|
||||||
right->y = left->y;
|
right->y = left->y;
|
||||||
right->w = col_w;
|
right->w = col_w;
|
||||||
right->h = button_h;
|
right->h = h;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user