修改抽取机制
This commit is contained in:
+59
-11
@@ -748,7 +748,7 @@ void TDrawScreen(HDC hdc, HWND hWnd)
|
||||
if (rogueStats.screenBombLevel > 0)
|
||||
{
|
||||
TCHAR bombText[96];
|
||||
_stprintf_s(bombText, _T("\u6e05\u5c4f\u70b8\u5f39 %d / 30 \u5e93\u5b58 %d"), rogueStats.screenBombCharge, rogueStats.screenBombCount);
|
||||
_stprintf_s(bombText, _T("\u6e05\u5c4f\u70b8\u5f39 %d / 30 \u5e93\u5b58 %d X \u4e3b\u52a8\u91ca\u653e"), rogueStats.screenBombCharge, rogueStats.screenBombCount);
|
||||
TextOut(hdc, combatRect.left + SS(18), combatRect.top + SS(530), bombText, lstrlen(bombText));
|
||||
}
|
||||
|
||||
@@ -934,6 +934,14 @@ void TDrawScreen(HDC hdc, HWND hWnd)
|
||||
{
|
||||
_stprintf_s(upgradeSummary + lstrlen(upgradeSummary), 512 - lstrlen(upgradeSummary), _T("\u8d4c\u5f92 Lv.%d\r\n"), rogueStats.gamblerLevel);
|
||||
}
|
||||
if (rogueStats.dualChoiceLevel > 0)
|
||||
{
|
||||
_stprintf_s(upgradeSummary + lstrlen(upgradeSummary), 512 - lstrlen(upgradeSummary), _T("\u53cc\u91cd\u9009\u62e9 Lv.1\r\n"));
|
||||
}
|
||||
if (rogueStats.destinyWheelLevel > 0)
|
||||
{
|
||||
_stprintf_s(upgradeSummary + lstrlen(upgradeSummary), 512 - lstrlen(upgradeSummary), _T("\u547d\u8fd0\u8f6e\u76d8 Lv.1\r\n"));
|
||||
}
|
||||
if (lstrlen(upgradeSummary) == 0)
|
||||
{
|
||||
_stprintf_s(upgradeSummary, _T("\u6682\u672a\u9009\u62e9\u4efb\u4f55\u5f3a\u5316\u3002\r\n\u5347\u7ea7\u540e\u4f1a\u5728\u8fd9\u91cc\u7d2f\u79ef\u663e\u793a\u3002"));
|
||||
@@ -1243,13 +1251,25 @@ void TDrawScreen(HDC hdc, HWND hWnd)
|
||||
overlayRect.right,
|
||||
overlayRect.top + SS(106)
|
||||
};
|
||||
DrawText(hdc, _T("\u8bf7\u4ece\u4e09\u4e2a\u9009\u9879\u4e2d\u9009\u62e9\u4e00\u4e2a\u5f3a\u5316"), -1, &overlaySubtitleRect, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
|
||||
TCHAR overlaySubtitle[128];
|
||||
_stprintf_s(
|
||||
overlaySubtitle,
|
||||
_T("\u672c\u6b21\u51fa\u73b0 %d \u4e2a\u9009\u9879\uff0c\u8fd8\u53ef\u9009 %d \u4e2a"),
|
||||
upgradeUiState.optionCount,
|
||||
upgradeUiState.picksRemaining);
|
||||
DrawText(hdc, overlaySubtitle, -1, &overlaySubtitleRect, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
|
||||
|
||||
int gap = SS(18);
|
||||
int horizontalPadding = SS(36);
|
||||
int verticalTop = overlayRect.top + SS(138);
|
||||
int rowCount = (upgradeUiState.optionCount + 1) / 2;
|
||||
if (rowCount < 1)
|
||||
{
|
||||
rowCount = 1;
|
||||
}
|
||||
int cardWidth = (overlayRect.right - overlayRect.left - horizontalPadding * 2 - gap) / 2;
|
||||
int cardHeight = (overlayRect.bottom - verticalTop - SS(72) - gap) / 2;
|
||||
int availableHeight = overlayRect.bottom - verticalTop - SS(72) - (rowCount - 1) * gap;
|
||||
int cardHeight = availableHeight / rowCount;
|
||||
|
||||
for (int i = 0; i < upgradeUiState.optionCount; i++)
|
||||
{
|
||||
@@ -1268,8 +1288,31 @@ void TDrawScreen(HDC hdc, HWND hWnd)
|
||||
top + cardHeight
|
||||
};
|
||||
|
||||
HBRUSH cardBrush = CreateSolidBrush(isSelected ? RGB(255, 235, 242) : RGB(255, 247, 250));
|
||||
HPEN cardPen = CreatePen(PS_SOLID, isSelected ? SS(3) : 1, isSelected ? accentColor : RGB(221, 197, 208));
|
||||
COLORREF cardFill = RGB(255, 247, 250);
|
||||
COLORREF cardBorder = RGB(221, 197, 208);
|
||||
COLORREF iconFill = RGB(233, 206, 217);
|
||||
COLORREF categoryColor = RGB(122, 95, 110);
|
||||
COLORREF descColor = RGB(108, 86, 99);
|
||||
COLORREF footerColor = RGB(128, 104, 118);
|
||||
|
||||
if (upgradeUiState.options[i].cursed)
|
||||
{
|
||||
cardFill = isSelected ? RGB(255, 233, 233) : RGB(255, 243, 243);
|
||||
cardBorder = isSelected ? RGB(210, 92, 92) : RGB(224, 156, 156);
|
||||
iconFill = isSelected ? RGB(235, 128, 128) : RGB(232, 182, 182);
|
||||
categoryColor = RGB(146, 73, 73);
|
||||
descColor = RGB(120, 74, 74);
|
||||
footerColor = RGB(150, 70, 70);
|
||||
}
|
||||
else if (isSelected)
|
||||
{
|
||||
cardFill = RGB(255, 235, 242);
|
||||
cardBorder = accentColor;
|
||||
iconFill = RGB(242, 176, 202);
|
||||
}
|
||||
|
||||
HBRUSH cardBrush = CreateSolidBrush(cardFill);
|
||||
HPEN cardPen = CreatePen(PS_SOLID, isSelected ? SS(3) : 1, cardBorder);
|
||||
oldPen = (HPEN)SelectObject(hdc, cardPen);
|
||||
oldBrush = (HBRUSH)SelectObject(hdc, cardBrush);
|
||||
RoundRect(hdc, cardRect.left, cardRect.top, cardRect.right, cardRect.bottom, SS(24), SS(24));
|
||||
@@ -1286,7 +1329,7 @@ void TDrawScreen(HDC hdc, HWND hWnd)
|
||||
cardRect.top + SS(84)
|
||||
};
|
||||
|
||||
HBRUSH iconBrush = CreateSolidBrush(isSelected ? RGB(242, 176, 202) : RGB(233, 206, 217));
|
||||
HBRUSH iconBrush = CreateSolidBrush(iconFill);
|
||||
HPEN iconPen = CreatePen(PS_SOLID, 1, RGB(255, 250, 252));
|
||||
oldPen = (HPEN)SelectObject(hdc, iconPen);
|
||||
oldBrush = (HBRUSH)SelectObject(hdc, iconBrush);
|
||||
@@ -1297,7 +1340,7 @@ void TDrawScreen(HDC hdc, HWND hWnd)
|
||||
DeleteObject(iconPen);
|
||||
|
||||
SelectObject(hdc, smallFont);
|
||||
SetTextColor(hdc, RGB(122, 95, 110));
|
||||
SetTextColor(hdc, categoryColor);
|
||||
RECT categoryRect =
|
||||
{
|
||||
cardRect.left + SS(20),
|
||||
@@ -1319,7 +1362,7 @@ void TDrawScreen(HDC hdc, HWND hWnd)
|
||||
DrawText(hdc, levelText, -1, &levelRect, DT_RIGHT | DT_VCENTER | DT_SINGLELINE);
|
||||
|
||||
SelectObject(hdc, sectionFont);
|
||||
SetTextColor(hdc, isSelected ? titleColor : textColor);
|
||||
SetTextColor(hdc, upgradeUiState.options[i].cursed ? RGB(130, 54, 54) : (isSelected ? titleColor : textColor));
|
||||
RECT nameRect =
|
||||
{
|
||||
cardRect.left + SS(20),
|
||||
@@ -1330,7 +1373,7 @@ void TDrawScreen(HDC hdc, HWND hWnd)
|
||||
DrawText(hdc, upgradeUiState.options[i].name, -1, &nameRect, DT_LEFT | DT_VCENTER | DT_WORDBREAK);
|
||||
|
||||
SelectObject(hdc, bodyFont);
|
||||
SetTextColor(hdc, RGB(108, 86, 99));
|
||||
SetTextColor(hdc, descColor);
|
||||
RECT descRect =
|
||||
{
|
||||
cardRect.left + SS(20),
|
||||
@@ -1348,8 +1391,13 @@ void TDrawScreen(HDC hdc, HWND hWnd)
|
||||
cardRect.right - SS(20),
|
||||
cardRect.bottom - SS(22)
|
||||
};
|
||||
SetTextColor(hdc, RGB(128, 104, 118));
|
||||
DrawText(hdc, _T("\u5360\u4f4d\u56fe\u6807 / \u5360\u4f4d\u7a00\u6709\u5ea6"), -1, &footerRect, DT_LEFT | DT_VCENTER | DT_SINGLELINE);
|
||||
SetTextColor(hdc, footerColor);
|
||||
DrawText(
|
||||
hdc,
|
||||
upgradeUiState.options[i].cursed ? _T("\u547d\u8fd0\u8f6e\u76d8\uff1a\u9644\u5e26\u8bc5\u5492") : _T("\u5360\u4f4d\u56fe\u6807 / \u5360\u4f4d\u7a00\u6709\u5ea6"),
|
||||
-1,
|
||||
&footerRect,
|
||||
DT_LEFT | DT_VCENTER | DT_SINGLELINE);
|
||||
}
|
||||
|
||||
SelectObject(hdc, smallFont);
|
||||
|
||||
Reference in New Issue
Block a user