From c8373f240750788c6c2aead46d6cc9e709ef9131 Mon Sep 17 00:00:00 2001 From: Joe DiPrima Date: Tue, 11 Aug 2026 15:51:07 -0500 Subject: [PATCH] #169 lobby room layout: LEAVE button was half-clipped because 560x360 was the OUTER window size (the caption bar ate the bottom ~47px of a client that needed 336+), and rosters past 6 members drew through the fixed LAUNCH frame at y=250 (rows flow to 268 at 8 players). Buttons now sit below the full 8-slot roster (LAUNCH 280-326, LEAVE 336-366) and the window is sized by CLIENT rect via AdjustWindowRect (560x382). Geometry-proven; visual verify = next lobby + Friday's 8-player night. Co-Authored-By: Claude Fable 5 --- game/glass/btl4lobby.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/game/glass/btl4lobby.cpp b/game/glass/btl4lobby.cpp index b61fb47..fdf673c 100644 --- a/game/glass/btl4lobby.cpp +++ b/game/glass/btl4lobby.cpp @@ -207,8 +207,15 @@ static int static int roomIsHost = 0; static int roomResult = 0; // 0 pending, 1 go, -1 cancel -static RECT roomLaunchRect = { 140, 250, 420, 296 }; -static RECT roomLeaveRect = { 140, 306, 300, 336 }; +// #169: the buttons sit BELOW the full 8-slot roster (rows y=60..268), and the +// window is sized by CLIENT rect (AdjustWindowRect at creation) -- the old +// 560x360 was the OUTER size, so the caption bar ate the bottom ~47px and the +// LEAVE button (bottom=336) drew half-clipped, while rosters past 6 members +// plowed into the fixed LAUNCH frame (Lynx's 8-player clutter shot). +static RECT roomLaunchRect = { 140, 280, 420, 326 }; +static RECT roomLeaveRect = { 140, 336, 300, 366 }; +static const int kRoomClientW = 560; +static const int kRoomClientH = 382; // LEAVE bottom 366 + 16 margin static void PaintRoom(HWND window) @@ -362,10 +369,12 @@ static int window_class.lpszClassName = L"BTLobbyRoomWnd"; RegisterClassW(&window_class); + RECT outer = { 0, 0, kRoomClientW, kRoomClientH }; // #169: size by CLIENT rect + AdjustWindowRect(&outer, WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU, FALSE); HWND window = CreateWindowW( L"BTLobbyRoomWnd", L"BattleTech - Steam Lobby", WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU, - 160, 160, 560, 360, + 160, 160, outer.right - outer.left, outer.bottom - outer.top, NULL, NULL, GetModuleHandleW(NULL), NULL); if (window == NULL) {