完善帮助
This commit is contained in:
+44
-1
@@ -698,10 +698,53 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (wParam)
|
||||
{
|
||||
case VK_UP:
|
||||
case VK_LEFT:
|
||||
case 'W':
|
||||
case 'A':
|
||||
if (helpState.currentPage == 0)
|
||||
{
|
||||
helpState.selectedIndex--;
|
||||
if (helpState.selectedIndex < 0)
|
||||
{
|
||||
helpState.selectedIndex = helpState.optionCount - 1;
|
||||
}
|
||||
InvalidateRect(hWnd, nullptr, FALSE);
|
||||
}
|
||||
break;
|
||||
case VK_DOWN:
|
||||
case VK_RIGHT:
|
||||
case 'S':
|
||||
case 'D':
|
||||
if (helpState.currentPage == 0)
|
||||
{
|
||||
helpState.selectedIndex++;
|
||||
if (helpState.selectedIndex >= helpState.optionCount)
|
||||
{
|
||||
helpState.selectedIndex = 0;
|
||||
}
|
||||
InvalidateRect(hWnd, nullptr, FALSE);
|
||||
}
|
||||
break;
|
||||
case VK_RETURN:
|
||||
case VK_SPACE:
|
||||
if (helpState.currentPage == 0)
|
||||
{
|
||||
helpState.currentPage = helpState.selectedIndex + 1;
|
||||
InvalidateRect(hWnd, nullptr, FALSE);
|
||||
}
|
||||
break;
|
||||
case VK_ESCAPE:
|
||||
case VK_BACK:
|
||||
case 'M':
|
||||
ReturnToMainMenu();
|
||||
if (helpState.currentPage == 0)
|
||||
{
|
||||
ReturnToMainMenu();
|
||||
}
|
||||
else
|
||||
{
|
||||
helpState.currentPage = 0;
|
||||
}
|
||||
InvalidateRect(hWnd, nullptr, FALSE);
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user