将操作说明拆分为独立游戏规则页面并精简主界面侧栏
This commit is contained in:
+28
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user