调整ui
This commit is contained in:
+55
-42
@@ -312,15 +312,7 @@ void TDrawScreen(HDC hdc, HWND hWnd)
|
||||
SY(WINDOW_CLIENT_HEIGHT - 70)
|
||||
};
|
||||
|
||||
HPEN menuFramePen = CreatePen(PS_SOLID, 1, frameColor);
|
||||
HBRUSH menuCardBrush = CreateSolidBrush(cardColor);
|
||||
oldPen = (HPEN)SelectObject(hdc, menuFramePen);
|
||||
oldBrush = (HBRUSH)SelectObject(hdc, menuCardBrush);
|
||||
RoundRect(hdc, menuCard.left, menuCard.top, menuCard.right, menuCard.bottom, SS(34), SS(34));
|
||||
SelectObject(hdc, oldBrush);
|
||||
SelectObject(hdc, oldPen);
|
||||
DeleteObject(menuCardBrush);
|
||||
DeleteObject(menuFramePen);
|
||||
DrawPanelCardAlpha(menuCard, cardColor, frameColor, 34, 214);
|
||||
|
||||
HFONT oldFont = (HFONT)SelectObject(hdc, titleFont);
|
||||
SetTextColor(hdc, titleColor);
|
||||
@@ -372,15 +364,22 @@ void TDrawScreen(HDC hdc, HWND hWnd)
|
||||
top + SS(104)
|
||||
};
|
||||
|
||||
HBRUSH optionBrush = CreateSolidBrush(isSelected ? RGB(255, 232, 240) : RGB(255, 247, 250));
|
||||
HPEN optionPen = CreatePen(PS_SOLID, isSelected ? SS(3) : 1, isSelected ? accentColor : RGB(226, 198, 210));
|
||||
oldPen = (HPEN)SelectObject(hdc, optionPen);
|
||||
oldBrush = (HBRUSH)SelectObject(hdc, optionBrush);
|
||||
RoundRect(hdc, optionRect.left, optionRect.top, optionRect.right, optionRect.bottom, SS(24), SS(24));
|
||||
SelectObject(hdc, oldBrush);
|
||||
SelectObject(hdc, oldPen);
|
||||
DeleteObject(optionBrush);
|
||||
DeleteObject(optionPen);
|
||||
DrawPanelCardAlpha(
|
||||
optionRect,
|
||||
isSelected ? RGB(255, 232, 240) : RGB(255, 247, 250),
|
||||
isSelected ? accentColor : RGB(226, 198, 210),
|
||||
24,
|
||||
isSelected ? 208 : 172);
|
||||
if (isSelected)
|
||||
{
|
||||
HPEN optionPen = CreatePen(PS_SOLID, SS(3), accentColor);
|
||||
oldPen = (HPEN)SelectObject(hdc, optionPen);
|
||||
oldBrush = (HBRUSH)SelectObject(hdc, GetStockObject(NULL_BRUSH));
|
||||
RoundRect(hdc, optionRect.left, optionRect.top, optionRect.right, optionRect.bottom, SS(24), SS(24));
|
||||
SelectObject(hdc, oldBrush);
|
||||
SelectObject(hdc, oldPen);
|
||||
DeleteObject(optionPen);
|
||||
}
|
||||
|
||||
RECT modeNameRect =
|
||||
{
|
||||
@@ -1548,7 +1547,6 @@ void TDrawScreen(HDC hdc, HWND hWnd)
|
||||
|
||||
if (currentScreen == SCREEN_UPGRADE)
|
||||
{
|
||||
HBRUSH dimBrush = CreateSolidBrush(RGB(246, 232, 238));
|
||||
RECT dimRect =
|
||||
{
|
||||
SX(20),
|
||||
@@ -1556,8 +1554,14 @@ void TDrawScreen(HDC hdc, HWND hWnd)
|
||||
SX(WINDOW_CLIENT_WIDTH - 20),
|
||||
SY(WINDOW_CLIENT_HEIGHT - 20)
|
||||
};
|
||||
FillRect(hdc, &dimRect, dimBrush);
|
||||
DeleteObject(dimBrush);
|
||||
Graphics dimGraphics(hdc);
|
||||
SolidBrush dimBrush(Color(214, 246, 232, 238));
|
||||
dimGraphics.FillRectangle(
|
||||
&dimBrush,
|
||||
static_cast<INT>(dimRect.left),
|
||||
static_cast<INT>(dimRect.top),
|
||||
static_cast<INT>(dimRect.right - dimRect.left),
|
||||
static_cast<INT>(dimRect.bottom - dimRect.top));
|
||||
|
||||
RECT overlayRect =
|
||||
{
|
||||
@@ -1567,15 +1571,7 @@ void TDrawScreen(HDC hdc, HWND hWnd)
|
||||
SY(WINDOW_CLIENT_HEIGHT - 80)
|
||||
};
|
||||
|
||||
HBRUSH overlayBrush = CreateSolidBrush(RGB(255, 250, 252));
|
||||
HPEN overlayPen = CreatePen(PS_SOLID, SS(2), RGB(232, 170, 194));
|
||||
oldPen = (HPEN)SelectObject(hdc, overlayPen);
|
||||
oldBrush = (HBRUSH)SelectObject(hdc, overlayBrush);
|
||||
RoundRect(hdc, overlayRect.left, overlayRect.top, overlayRect.right, overlayRect.bottom, SS(30), SS(30));
|
||||
SelectObject(hdc, oldBrush);
|
||||
SelectObject(hdc, oldPen);
|
||||
DeleteObject(overlayBrush);
|
||||
DeleteObject(overlayPen);
|
||||
DrawPanelCardAlpha(overlayRect, RGB(255, 250, 252), RGB(232, 170, 194), 30, 238);
|
||||
|
||||
SetTextColor(hdc, titleColor);
|
||||
SelectObject(hdc, titleFont);
|
||||
@@ -1658,15 +1654,17 @@ void TDrawScreen(HDC hdc, HWND hWnd)
|
||||
cardBorder = accentColor;
|
||||
}
|
||||
|
||||
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));
|
||||
SelectObject(hdc, oldBrush);
|
||||
SelectObject(hdc, oldPen);
|
||||
DeleteObject(cardBrush);
|
||||
DeleteObject(cardPen);
|
||||
DrawPanelCardAlpha(cardRect, cardFill, cardBorder, 24, isSelected ? 238 : 226);
|
||||
if (isSelected)
|
||||
{
|
||||
HPEN selectedPen = CreatePen(PS_SOLID, SS(3), cardBorder);
|
||||
oldPen = (HPEN)SelectObject(hdc, selectedPen);
|
||||
oldBrush = (HBRUSH)SelectObject(hdc, GetStockObject(NULL_BRUSH));
|
||||
RoundRect(hdc, cardRect.left, cardRect.top, cardRect.right, cardRect.bottom, SS(24), SS(24));
|
||||
SelectObject(hdc, oldBrush);
|
||||
SelectObject(hdc, oldPen);
|
||||
DeleteObject(selectedPen);
|
||||
}
|
||||
|
||||
TCHAR levelText[32];
|
||||
_stprintf_s(levelText, _T("Lv.%d"), upgradeUiState.options[i].currentLevel + 1);
|
||||
@@ -1694,22 +1692,37 @@ void TDrawScreen(HDC hdc, HWND hWnd)
|
||||
|
||||
SelectObject(hdc, bodyFont);
|
||||
SetTextColor(hdc, descColor);
|
||||
const TCHAR* synthesisPath = GetUpgradeSynthesisPath(upgradeUiState.options[i].id);
|
||||
bool hasSynthesisPath = synthesisPath != nullptr && lstrlen(synthesisPath) > 0;
|
||||
RECT descRect =
|
||||
{
|
||||
cardRect.left + SS(20),
|
||||
cardRect.top + SS(116),
|
||||
cardRect.right - SS(20),
|
||||
cardRect.bottom - SS(64)
|
||||
cardRect.bottom - (hasSynthesisPath ? SS(98) : SS(64))
|
||||
};
|
||||
DrawText(hdc, upgradeUiState.options[i].description, -1, &descRect, DT_LEFT | DT_WORDBREAK);
|
||||
|
||||
SelectObject(hdc, smallFont);
|
||||
if (hasSynthesisPath)
|
||||
{
|
||||
RECT synthesisRect =
|
||||
{
|
||||
cardRect.left + SS(20),
|
||||
cardRect.bottom - SS(88),
|
||||
cardRect.right - SS(20),
|
||||
cardRect.bottom - SS(58)
|
||||
};
|
||||
SetTextColor(hdc, upgradeUiState.options[i].cursed ? RGB(142, 78, 78) : RGB(116, 82, 104));
|
||||
DrawText(hdc, synthesisPath, -1, &synthesisRect, DT_LEFT | DT_VCENTER | DT_SINGLELINE);
|
||||
}
|
||||
|
||||
RECT footerRect =
|
||||
{
|
||||
cardRect.left + SS(20),
|
||||
cardRect.bottom - SS(52),
|
||||
cardRect.bottom - SS(42),
|
||||
cardRect.right - SS(20),
|
||||
cardRect.bottom - SS(22)
|
||||
cardRect.bottom - SS(14)
|
||||
};
|
||||
SetTextColor(hdc, footerColor);
|
||||
DrawText(
|
||||
|
||||
Reference in New Issue
Block a user