Glass cockpit: radar columns reach under the map too
The amber Secondary/Screen columns get the same treatment as the red MFD banks, turned on its side: each button reaches 100px in behind the map with a 10px indicator clearing the edge, so the lamp reads as a slim column and the radar picture is the click target. The shared buttonDepth/indicatorStrip constants now drive both banks, and the columns are clamped so they can never meet behind a narrow map. The map pane narrows from 404 to 344 for a 324-wide glass, handing the difference back to the viewscreen. Verified live: clicking 60px inside the radar from either edge presses the column button behind it, with feedback in that side's strip (720 and 1350 pixels). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+29
-21
@@ -11,13 +11,14 @@ namespace
|
||||
const int buttonGap = 4;
|
||||
|
||||
//---------------------------------------------------------------
|
||||
// MFD button banks run UNDER the glass: the button is this tall
|
||||
// in total, but only the indicator strip shows past the display
|
||||
// edge - the rest sits behind the MFD picture, which is what the
|
||||
// player actually clicks.
|
||||
// Button banks run UNDER the glass: a button reaches this far in
|
||||
// from the display edge, but only the indicator strip clears that
|
||||
// edge - the rest sits behind the picture, which is what the
|
||||
// player actually clicks. Applies to both the MFD strips (depth
|
||||
// measured vertically) and the map's side columns (horizontally).
|
||||
//---------------------------------------------------------------
|
||||
const int mfdButtonHeight = 100;
|
||||
const int mfdIndicatorStrip = 10;
|
||||
const int buttonDepth = 100;
|
||||
const int indicatorStrip = 10;
|
||||
|
||||
//---------------------------------------------------------------
|
||||
// Button fill colors by lamp brightness (0 off / 1-2 dim / 3
|
||||
@@ -271,8 +272,8 @@ void
|
||||
// and the picture above/below it is the click target. Paint
|
||||
// draws the buttons before the MFD image for that reason.
|
||||
//-----------------------------------------------------------
|
||||
int strip_h = mfdIndicatorStrip;
|
||||
int button_h = mfdButtonHeight;
|
||||
int strip_h = indicatorStrip;
|
||||
int button_h = buttonDepth;
|
||||
|
||||
// on a scaled-down cockpit, keep the two banks from meeting
|
||||
int limit = (display_height + 2 * strip_h) / 2;
|
||||
@@ -305,20 +306,27 @@ void
|
||||
else if (button_style == SideColumns)
|
||||
{
|
||||
//-----------------------------------------------------------
|
||||
// 6 buttons down each side of the glass, stacked contiguous
|
||||
// and flush to the pane edges, 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.
|
||||
// 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.
|
||||
//
|
||||
// Same trick as the MFD banks, turned on its side: each
|
||||
// button reaches buttonDepth in behind the map and leaves an
|
||||
// indicatorStrip clearing the edge, so the lamp reads as a
|
||||
// slim column and the map itself is the click target.
|
||||
//-----------------------------------------------------------
|
||||
int col_w = display_width / 8;
|
||||
if (col_w < 20) col_w = 20;
|
||||
if (col_w > 40) col_w = 40;
|
||||
int strip_w = indicatorStrip;
|
||||
int button_w = buttonDepth;
|
||||
|
||||
// keep the two columns from meeting behind a narrow map
|
||||
int limit = (display_width + 2 * strip_w) / 2;
|
||||
if (button_w > limit) button_w = limit;
|
||||
if (button_w < strip_w) button_w = strip_w;
|
||||
|
||||
int button_h = display_height / 6;
|
||||
|
||||
displayX = col_w;
|
||||
*client_width = display_width + 2 * col_w;
|
||||
displayX = strip_w;
|
||||
*client_width = display_width + 2 * strip_w;
|
||||
|
||||
for (int i = 0; i < 6; ++i)
|
||||
{
|
||||
@@ -329,15 +337,15 @@ void
|
||||
left->amber = 1;
|
||||
left->x = 0;
|
||||
left->y = i * button_h;
|
||||
left->w = col_w;
|
||||
left->w = button_w;
|
||||
left->h = h;
|
||||
|
||||
ScreenButton *right = &buttons[buttonCount++];
|
||||
right->unit = anchorB + i;
|
||||
right->amber = 1;
|
||||
right->x = displayX + displayW;
|
||||
right->x = displayX + displayW + strip_w - button_w;
|
||||
right->y = left->y;
|
||||
right->w = col_w;
|
||||
right->w = button_w;
|
||||
right->h = h;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user