mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-10-30 07:11:05 +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
|
||||
);
|
||||
|
||||
ImVec2 marqueeMin = { textMarqueeX, min.y };
|
||||
|
||||
SetMarqueeFade(marqueeMin, max, Scale(32));
|
||||
|
||||
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.
|
||||
DrawTextWithMarqueeShadow
|
||||
(
|
||||
|
|
@ -239,17 +240,15 @@ static void DrawAchievement(int rowIndex, float yOffset, Achievement& achievemen
|
|||
{ textX, min.y + descTextY },
|
||||
marqueeMin,
|
||||
max,
|
||||
isUnlocked ? IM_COL32(255, 255, 255, 255) : colLockedText,
|
||||
isUnlocked ? IM_COL32_WHITE : colLockedText,
|
||||
desc,
|
||||
g_rowSelectionTime,
|
||||
0.9,
|
||||
Scale(250.0),
|
||||
Scale(250),
|
||||
shadowOffset,
|
||||
0.4f,
|
||||
colTextShadow
|
||||
);
|
||||
|
||||
ResetMarqueeFade();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -259,7 +258,7 @@ static void DrawAchievement(int rowIndex, float yOffset, Achievement& achievemen
|
|||
g_fntSeurat,
|
||||
fontSize,
|
||||
{ textX, min.y + descTextY },
|
||||
isUnlocked ? IM_COL32(255, 255, 255, 255) : colLockedText,
|
||||
isUnlocked ? IM_COL32_WHITE : colLockedText,
|
||||
desc,
|
||||
shadowOffset,
|
||||
0.4f,
|
||||
|
|
@ -267,6 +266,8 @@ static void DrawAchievement(int rowIndex, float yOffset, Achievement& achievemen
|
|||
);
|
||||
}
|
||||
|
||||
ResetMarqueeFade();
|
||||
|
||||
drawList->PopClipRect();
|
||||
|
||||
if (!isUnlocked)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue