升级多选优化

This commit is contained in:
2026-04-26 14:57:21 +08:00
parent 24c24acf44
commit cbf7bac239
5 changed files with 173 additions and 9 deletions
+39 -7
View File
@@ -1844,11 +1844,23 @@ void TDrawScreen(HDC hdc, HWND hWnd)
overlayRect.top + SS(106)
};
TCHAR overlaySubtitle[128];
_stprintf_s(
overlaySubtitle,
_T("出现 %d 个强化,还可选择 %d 个"),
upgradeUiState.optionCount,
upgradeUiState.picksRemaining);
if (upgradeUiState.picksRemaining > 1)
{
_stprintf_s(
overlaySubtitle,
_T("出现 %d 个强化,请标记 %d 个(已选 %d 个)"),
upgradeUiState.optionCount,
upgradeUiState.picksRemaining,
upgradeUiState.markedCount);
}
else
{
_stprintf_s(
overlaySubtitle,
_T("出现 %d 个强化,还可选择 %d 个"),
upgradeUiState.optionCount,
upgradeUiState.picksRemaining);
}
DrawText(hdc, overlaySubtitle, -1, &overlaySubtitleRect, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
int gap = SS(18);
@@ -1871,6 +1883,7 @@ void TDrawScreen(HDC hdc, HWND hWnd)
for (int i = 0; i < upgradeUiState.optionCount; i++)
{
bool isSelected = (i == upgradeUiState.selectedIndex);
bool isMarked = upgradeUiState.marked[i];
int column = i % columnCount;
int row = i / columnCount;
int left = overlayRect.left + horizontalPadding + column * (cardWidth + gap);
@@ -1920,6 +1933,11 @@ void TDrawScreen(HDC hdc, HWND hWnd)
rarityText = _T("\u7a00\u6709\u5ea6\uff1a\u7f55\u89c1");
}
if (isMarked && !upgradeUiState.options[i].cursed)
{
cardFill = RGB(255, 226, 236);
}
if (isSelected && !upgradeUiState.options[i].cursed)
{
cardFill = RGB(255, 235, 242);
@@ -1948,7 +1966,14 @@ void TDrawScreen(HDC hdc, HWND hWnd)
};
SelectObject(hdc, smallFont);
SetTextColor(hdc, footerColor);
DrawText(hdc, levelText, -1, &levelRect, DT_RIGHT | DT_VCENTER | DT_SINGLELINE);
if (isMarked)
{
DrawText(hdc, _T("[已选]"), -1, &levelRect, DT_RIGHT | DT_VCENTER | DT_SINGLELINE);
}
else
{
DrawText(hdc, levelText, -1, &levelRect, DT_RIGHT | DT_VCENTER | DT_SINGLELINE);
}
SelectObject(hdc, sectionFont);
SetTextColor(hdc, upgradeUiState.options[i].cursed ? RGB(130, 54, 54) : (isSelected ? titleColor : textColor));
@@ -2011,7 +2036,14 @@ void TDrawScreen(HDC hdc, HWND hWnd)
overlayRect.right - SS(30),
overlayRect.bottom - SS(18)
};
DrawText(hdc, _T("W/A/S/D \u6216\u65b9\u5411\u952e\u5207\u6362\uff0cEnter \u6216 Space \u786e\u8ba4"), -1, &hintRect, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
DrawText(
hdc,
upgradeUiState.picksRemaining > 1
? _T("W/A/S/D 或方向键切换,Space 标记,Enter 确认已选强化")
: _T("W/A/S/D 或方向键切换,Enter 或 Space 确认"),
-1,
&hintRect,
DT_CENTER | DT_VCENTER | DT_SINGLELINE);
}
DrawMusicButton();