加入帮助页轮播框架未完善(实则一坨)

This commit is contained in:
2026-04-28 15:03:51 +08:00
parent 647038b27a
commit da741d1e56
6 changed files with 494 additions and 10 deletions
+54 -4
View File
@@ -789,6 +789,19 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
shouldRefresh = true;
}
if (IsRogueSkillDemoMode())
{
if (TickRogueSkillDemo())
{
shouldRefresh = true;
}
if (shouldRefresh)
{
InvalidateRect(hWnd, nullptr, FALSE);
}
break;
}
if (currentMode == MODE_ROGUE && rogueStats.feverTicks > 0)
{
rogueStats.feverTicks--;
@@ -990,8 +1003,16 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
if (IsPointInRect(GetHelpOptionRect(hWnd, i), mouseX, mouseY))
{
helpState.selectedIndex = i;
helpState.currentPage = i + 1;
helpScrollOffset = 0;
if (i == 3)
{
StartRogueSkillDemo();
ResetGameTimer(hWnd);
}
else
{
helpState.currentPage = i + 1;
helpScrollOffset = 0;
}
InvalidateRect(hWnd, nullptr, FALSE);
break;
}
@@ -1259,8 +1280,16 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
case VK_SPACE:
if (helpState.currentPage == 0)
{
helpState.currentPage = helpState.selectedIndex + 1;
helpScrollOffset = 0;
if (helpState.selectedIndex == 3)
{
StartRogueSkillDemo();
ResetGameTimer(hWnd);
}
else
{
helpState.currentPage = helpState.selectedIndex + 1;
helpScrollOffset = 0;
}
InvalidateRect(hWnd, nullptr, FALSE);
}
break;
@@ -1398,6 +1427,27 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
break;
}
if (IsRogueSkillDemoMode())
{
if (wParam == VK_RETURN || wParam == VK_SPACE)
{
AdvanceRogueSkillDemo();
InvalidateRect(hWnd, nullptr, FALSE);
}
else if (wParam == 'R')
{
StartRogueSkillDemo();
ResetGameTimer(hWnd);
InvalidateRect(hWnd, nullptr, FALSE);
}
else if (wParam == VK_ESCAPE || wParam == VK_BACK || wParam == 'M')
{
ReturnToMainMenu();
InvalidateRect(hWnd, nullptr, FALSE);
}
break;
}
if (wParam == 'M')
{
ReturnToMainMenu();