diff --git a/MUNGA_L4/L4MFDVIEW.cpp b/MUNGA_L4/L4MFDVIEW.cpp index dfa9adc..b1031b9 100644 --- a/MUNGA_L4/L4MFDVIEW.cpp +++ b/MUNGA_L4/L4MFDVIEW.cpp @@ -92,6 +92,46 @@ namespace const int buttonDepth = 240; const int indicatorStrip = 10; + //--------------------------------------------------------------- + // Extra pixels of indicator strip, on top of the 10 above, so a + // FLASHING lamp is easier to notice on desktop glass - the pod's + // buttons were physical and backlit and never had that problem. + // Only the strip moves, so the button keeps its width and reaches + // the same distance behind the glass: this makes the lamp a + // LONGER bar, not a fatter face. The client size, the display + // offset and both banks all derive from strip_h/strip_w below, so + // the window grows to fit and nothing needs to know about it. + // + // DEFAULT 0 - Red Planet keeps the pod's geometry unless a player + // asks otherwise. (BattleTech 4.11 carries the same knob defaulted + // to 10, where the players asked for it; the two games are tuned + // separately on purpose.) Ported alongside RP412MFDLAYOUT, which + // took the same route from BT411's BT_GLASS_LAYOUT. + //--------------------------------------------------------------- + const int defaultProtrude = 0; + + int ProtrudeBonus() + { + static int bonus = -1; + if (bonus < 0) + { + const char *setting = getenv("RP412MFDPROTRUDE"); + bonus = (setting != NULL && setting[0] != '\0') + ? atoi(setting) // a word parses to 0, i.e. off + : defaultProtrude; + if (bonus < 0) bonus = 0; + if (bonus > 200) bonus = 200; + + if (bonus != 0) + { + DEBUG_STREAM << "MFDView: RP412MFDPROTRUDE=" << bonus + << " (indicator strip " << indicatorStrip << " -> " + << (indicatorStrip + bonus) << ")\n" << std::flush; + } + } + return bonus; + } + //--------------------------------------------------------------- // The map paints its own legend beside each side button, and that // grid is not the naive height/6: measured off the 640-tall map, @@ -649,7 +689,7 @@ 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 = indicatorStrip; + int strip_h = indicatorStrip + ProtrudeBonus(); int button_h = buttonDepth; // on a scaled-down cockpit, keep the two banks from meeting @@ -692,7 +732,7 @@ void // indicatorStrip clearing the edge, so the lamp reads as a // slim column and the map itself is the click target. //----------------------------------------------------------- - int strip_w = indicatorStrip; + int strip_w = indicatorStrip + ProtrudeBonus(); int button_w = buttonDepth; // keep the two columns from meeting behind a narrow map