优化帮助页逻辑
This commit is contained in:
+21
-12
@@ -981,7 +981,20 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
if (currentScreen != SCREEN_MENU && IsPointInRect(GetBackButtonRect(hWnd), mouseX, mouseY))
|
||||
{
|
||||
ReturnToMainMenu();
|
||||
if (currentScreen == SCREEN_PLAYING && IsRogueSkillDemoMode())
|
||||
{
|
||||
OpenSkillDemoScreen();
|
||||
}
|
||||
else if (currentScreen == SCREEN_RULES && helpState.currentPage != 0)
|
||||
{
|
||||
helpState.selectedIndex = (helpState.currentPage == 5) ? 3 : helpState.currentPage - 1;
|
||||
helpState.currentPage = 0;
|
||||
helpScrollOffset = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
ReturnToMainMenu();
|
||||
}
|
||||
InvalidateRect(hWnd, nullptr, FALSE);
|
||||
break;
|
||||
}
|
||||
@@ -1076,15 +1089,9 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
}
|
||||
else if (IsPointInRect(GetHelpBackHintRect(hWnd), mouseX, mouseY))
|
||||
{
|
||||
if (helpState.currentPage == 4)
|
||||
{
|
||||
ReturnToMainMenu();
|
||||
}
|
||||
else
|
||||
{
|
||||
helpState.currentPage = 0;
|
||||
helpScrollOffset = 0;
|
||||
}
|
||||
helpState.selectedIndex = (helpState.currentPage == 5) ? 3 : helpState.currentPage - 1;
|
||||
helpState.currentPage = 0;
|
||||
helpScrollOffset = 0;
|
||||
InvalidateRect(hWnd, nullptr, FALSE);
|
||||
}
|
||||
else if (helpState.currentPage == 4 && IsPointInRect(GetCreditArrowRect(hWnd, -1), mouseX, mouseY))
|
||||
@@ -1387,7 +1394,9 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
}
|
||||
else if (helpState.currentPage == 4)
|
||||
{
|
||||
ReturnToMainMenu();
|
||||
helpState.currentPage = 0;
|
||||
helpState.selectedIndex = 3;
|
||||
helpScrollOffset = 0;
|
||||
}
|
||||
else if (helpState.currentPage == 5)
|
||||
{
|
||||
@@ -1535,7 +1544,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
}
|
||||
else if (wParam == VK_ESCAPE || wParam == VK_BACK || wParam == 'M')
|
||||
{
|
||||
ReturnToMainMenu();
|
||||
OpenSkillDemoScreen();
|
||||
InvalidateRect(hWnd, nullptr, FALSE);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user