Panel/plasma: TOPMOST + right-edge parking -- the game window buried them

First dist feedback ('there is no glass panel'): both windows opened at the
top-left with no-activate and the game window then covered them.  The pod's
physical panel is always visible -- so is the glass one now: the button
panel parks at the screen's right edge, the plasma bottom-right, both
WS_EX_TOPMOST.  Verified live: panel left=2616 top=12 topmost, plasma
bottom-right topmost, game window below.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Cyd
2026-07-18 19:06:26 -05:00
co-authored by Claude Fable 5
parent 918abacfb8
commit bfe7c223ac
2 changed files with 34 additions and 6 deletions
+19 -3
View File
@@ -516,11 +516,27 @@ void
DWORD style = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX;
AdjustWindowRect(&frame, style, FALSE);
panelWindow = CreateWindowW(
//
// Park the panel at the RIGHT edge of the screen, TOPMOST: the game
// window opens after us and would otherwise bury the panel (found in
// the first dist: "there is no glass panel"). The pod's physical
// button banks are always visible -- so is the glass panel.
//
int frame_width = frame.right - frame.left;
int frame_height = frame.bottom - frame.top;
int screen_width = GetSystemMetrics(SM_CXSCREEN);
int panel_x = screen_width - frame_width - 12;
if (panel_x < 0)
{
panel_x = 0;
}
panelWindow = CreateWindowExW(
WS_EX_TOPMOST,
L"BTPadPanelWnd", L"BattleTech - Cockpit Buttons",
style,
40, 40,
frame.right - frame.left, frame.bottom - frame.top,
panel_x, 12,
frame_width, frame_height,
NULL, NULL, GetModuleHandleW(NULL), NULL);
if (panelWindow == NULL)
{
+15 -3
View File
@@ -79,11 +79,23 @@ void
DWORD style = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX;
AdjustWindowRect(&frame, style, FALSE);
window = CreateWindowW(
//
// Bottom-right, TOPMOST -- under the (topmost, right-parked) button
// panel, clear of the game window (which would otherwise bury it).
//
int frame_width = frame.right - frame.left;
int frame_height = frame.bottom - frame.top;
int plasma_x = GetSystemMetrics(SM_CXSCREEN) - frame_width - 12;
int plasma_y = GetSystemMetrics(SM_CYSCREEN) - frame_height - 60;
if (plasma_x < 0) plasma_x = 0;
if (plasma_y < 0) plasma_y = 0;
window = CreateWindowExW(
WS_EX_TOPMOST,
L"BTPlasmaWnd", L"BattleTech - Plasma",
style,
40, 480,
frame.right - frame.left, frame.bottom - frame.top,
plasma_x, plasma_y,
frame_width, frame_height,
NULL, NULL, GetModuleHandleW(NULL), NULL);
if (window == NULL)
{