mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-04-27 21:01:37 +00:00
achievement_menu: always fade long descriptions
This commit is contained in:
parent
3c6e348499
commit
8e98ab4651
1 changed files with 9 additions and 8 deletions
|
|
@ -226,11 +226,12 @@ static void DrawAchievement(int rowIndex, float yOffset, Achievement& achievemen
|
||||||
colTextShadow
|
colTextShadow
|
||||||
);
|
);
|
||||||
|
|
||||||
|
ImVec2 marqueeMin = { textMarqueeX, min.y };
|
||||||
|
|
||||||
|
SetMarqueeFade(marqueeMin, max, Scale(32));
|
||||||
|
|
||||||
if (isSelected && textX + textSize.x >= max.x - Scale(10))
|
if (isSelected && textX + textSize.x >= max.x - Scale(10))
|
||||||
{
|
{
|
||||||
ImVec2 marqueeMin = { textMarqueeX, min.y };
|
|
||||||
SetMarqueeFade(marqueeMin, max, Scale(32.0f));
|
|
||||||
|
|
||||||
// Draw achievement description with marquee.
|
// Draw achievement description with marquee.
|
||||||
DrawTextWithMarqueeShadow
|
DrawTextWithMarqueeShadow
|
||||||
(
|
(
|
||||||
|
|
@ -239,17 +240,15 @@ static void DrawAchievement(int rowIndex, float yOffset, Achievement& achievemen
|
||||||
{ textX, min.y + descTextY },
|
{ textX, min.y + descTextY },
|
||||||
marqueeMin,
|
marqueeMin,
|
||||||
max,
|
max,
|
||||||
isUnlocked ? IM_COL32(255, 255, 255, 255) : colLockedText,
|
isUnlocked ? IM_COL32_WHITE : colLockedText,
|
||||||
desc,
|
desc,
|
||||||
g_rowSelectionTime,
|
g_rowSelectionTime,
|
||||||
0.9,
|
0.9,
|
||||||
Scale(250.0),
|
Scale(250),
|
||||||
shadowOffset,
|
shadowOffset,
|
||||||
0.4f,
|
0.4f,
|
||||||
colTextShadow
|
colTextShadow
|
||||||
);
|
);
|
||||||
|
|
||||||
ResetMarqueeFade();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -259,7 +258,7 @@ static void DrawAchievement(int rowIndex, float yOffset, Achievement& achievemen
|
||||||
g_fntSeurat,
|
g_fntSeurat,
|
||||||
fontSize,
|
fontSize,
|
||||||
{ textX, min.y + descTextY },
|
{ textX, min.y + descTextY },
|
||||||
isUnlocked ? IM_COL32(255, 255, 255, 255) : colLockedText,
|
isUnlocked ? IM_COL32_WHITE : colLockedText,
|
||||||
desc,
|
desc,
|
||||||
shadowOffset,
|
shadowOffset,
|
||||||
0.4f,
|
0.4f,
|
||||||
|
|
@ -267,6 +266,8 @@ static void DrawAchievement(int rowIndex, float yOffset, Achievement& achievemen
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ResetMarqueeFade();
|
||||||
|
|
||||||
drawList->PopClipRect();
|
drawList->PopClipRect();
|
||||||
|
|
||||||
if (!isUnlocked)
|
if (!isUnlocked)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue