Glass cockpit: per-display windows (BT_GLASS_PANELS)
Break the desktop glass cockpit's secondary displays out of the single combined pad panel + D3D gauge strip into ONE window per pod display, each carrying that display's surface with its RIO button bank, arranged pod-faithfully around the main view. New TU engine/MUNGA_L4/L4GLASSWIN.* (BT_GLASS-only), selected by the -platform glass preset via the new runtime gate BT_GLASS_PANELS (=0 falls back to the legacy single panel + dock). - Surfaces are CPU-expanded from the shared gauge buffer (SVGA16::ExpandPlaneToBGRA, no D3D) and StretchDIBits'd in -- the D3D dev-composite path (dock / window / overlay) stands down while active. - Buttons sit UNDER the imagery: big hidden click targets that reach into the display, with only a small protruding edge showing as a lamp light. Red MFD banks tile the top/bottom; radar rails run the sides + a bottom row; a Flight Controls window hosts the no-display banks. - Windows: Heat / Engineering / Comm / Left Weapons / Right Weapons / radar + Flight Controls; edge-to-edge (no in-client margin/title; OS caption labels each). - Fix blank surfaces: application/ghWnd are duplicate-defined and bind non-deterministically under /FORCE, so the fresh L4GLASSWIN TU read NULL. Reach the renderer/window via BTResolveGaugeRenderer/BTResolveMainWindow defined in btl4main.cpp off the real btl4App/hWnd pointers. New gotcha: reconstruction-gotchas.md S6 duplicate-GLOBAL corollary. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
|
||||
#include "l4padrio.h"
|
||||
#include "l4padpanel.h"
|
||||
#include "l4glasswin.h"
|
||||
#include "l4ctrl.h"
|
||||
|
||||
#include <windows.h>
|
||||
@@ -168,10 +169,16 @@ PadRIO::PadRIO():
|
||||
<< "live on focus; L4PADFLIP=" << flipStickAxes << ")\n" << std::flush;
|
||||
|
||||
//
|
||||
// The on-screen cockpit button panel (step 2d) rides the device: the
|
||||
// glass preset sets BT_PAD_PANEL=1.
|
||||
// The on-screen cockpit buttons ride the device. BT_GLASS_PANELS (the
|
||||
// glass preset default) breaks each secondary display into its own window
|
||||
// with its RIO bank around it; otherwise the single combined pad panel
|
||||
// (BT_PAD_PANEL=1) is used.
|
||||
//
|
||||
if (getenv("BT_PAD_PANEL") != NULL && *getenv("BT_PAD_PANEL") != '0')
|
||||
if (BTGlassPanelsActive())
|
||||
{
|
||||
BTGlassPanels_Create();
|
||||
}
|
||||
else if (getenv("BT_PAD_PANEL") != NULL && *getenv("BT_PAD_PANEL") != '0')
|
||||
{
|
||||
BTPadPanel_Create();
|
||||
}
|
||||
@@ -179,6 +186,7 @@ PadRIO::PadRIO():
|
||||
|
||||
PadRIO::~PadRIO()
|
||||
{
|
||||
BTGlassPanels_Destroy(); // safe no-op if the glass windows were never created
|
||||
BTPadPanel_Destroy();
|
||||
if (activeInstance == this)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user