将游戏HUD重构为左右双栏布局并修复信息遮挡

This commit is contained in:
2026-04-25 20:34:22 +08:00
parent f6eb64f6ac
commit 200ee86962
2 changed files with 193 additions and 246 deletions
+2 -2
View File
@@ -12,10 +12,10 @@ constexpr int nGameHeight = 20;
constexpr int nWidth = 16;
constexpr int nHeight = 22;
constexpr int WINDOW_PADDING = 28;
constexpr int SIDE_PANEL_WIDTH = 320;
constexpr int SIDE_PANEL_WIDTH = 280;
constexpr int SIDE_PANEL_GAP = 28;
constexpr int SIDE_PANEL_HEIGHT = 760;
constexpr int WINDOW_CLIENT_WIDTH = WINDOW_PADDING * 2 + nGameWidth * GRID + SIDE_PANEL_GAP + SIDE_PANEL_WIDTH;
constexpr int WINDOW_CLIENT_WIDTH = WINDOW_PADDING * 2 + nGameWidth * GRID + SIDE_PANEL_GAP * 2 + SIDE_PANEL_WIDTH * 2;
constexpr int BOARD_CLIENT_HEIGHT = WINDOW_PADDING * 2 + nGameHeight * GRID + 20;
constexpr int WINDOW_CLIENT_HEIGHT = (BOARD_CLIENT_HEIGHT > SIDE_PANEL_HEIGHT) ? BOARD_CLIENT_HEIGHT : SIDE_PANEL_HEIGHT;