将操作说明拆分为独立游戏规则页面并精简主界面侧栏

This commit is contained in:
2026-04-24 18:19:04 +08:00
parent c5a6a5f843
commit 9664a2e623
5 changed files with 263 additions and 94 deletions
+28 -1
View File
@@ -203,7 +203,18 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
break;
case VK_RETURN:
case VK_SPACE:
StartGameWithMode(menuState.selectedIndex);
if (menuState.selectedIndex == 0)
{
StartGameWithMode(MODE_CLASSIC);
}
else if (menuState.selectedIndex == 1)
{
StartGameWithMode(MODE_ROGUE);
}
else
{
OpenRulesScreen();
}
ResetGameTimer(hWnd);
InvalidateRect(hWnd, nullptr, FALSE);
break;
@@ -216,6 +227,22 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
break;
}
if (currentScreen == SCREEN_RULES)
{
switch (wParam)
{
case VK_ESCAPE:
case VK_BACK:
case 'M':
ReturnToMainMenu();
InvalidateRect(hWnd, nullptr, FALSE);
break;
default:
break;
}
break;
}
if (currentScreen == SCREEN_UPGRADE)
{
switch (wParam)