@@ -245,11 +245,14 @@ static void DrawAchievement(int rowIndex, Achievement& achievement, bool isUnloc
245245 drawList->AddText (g_pFntRodin, fontSize, namePos, textColour, name.c_str ());
246246 SetShaderModifier (IMGUI_SHADER_MODIFIER_NONE);
247247
248- auto marqueeFadeScale = Scale (18 , true );
249- ImVec2 marqueeMin = { imageMax.x , min.y };
250- ImVec2 marqueeMax = { max.x - marqueeFadeScale, max.y };
248+ auto timestampOffsetX = Scale (60 , true );
249+
250+ ImVec2 marqueeMin = { textX + Scale (2 , true ), min.y };
251+ ImVec2 marqueeMax = { max.x - timestampOffsetX - Scale (1 , true ), max.y };
252+
253+ drawList->PushClipRect (marqueeMin, marqueeMax);
251254
252- if (isCurrent && textX + descSize.x >= max. x - marqueeFadeScale )
255+ if (isCurrent && marqueeMin. x + descSize.x >= marqueeMax. x )
253256 {
254257 // Draw achievement description with marquee.
255258 SetShaderModifier (IMGUI_SHADER_MODIFIER_LOW_QUALITY_TEXT);
@@ -264,6 +267,8 @@ static void DrawAchievement(int rowIndex, Achievement& achievement, bool isUnloc
264267 SetShaderModifier (IMGUI_SHADER_MODIFIER_NONE);
265268 }
266269
270+ drawList->PopClipRect ();
271+
267272 if (!isUnlocked)
268273 return ;
269274
@@ -285,7 +290,6 @@ static void DrawAchievement(int rowIndex, Achievement& achievement, bool isUnloc
285290 snprintf (buffer, sizeof (buffer), " %d/%d/%d %02d:%02d" ,
286291 pTime->tm_year + 1900 , pTime->tm_mon + 1 , pTime->tm_mday , pTime->tm_hour , pTime->tm_min );
287292
288- auto timestampOffsetX = Scale (60 , true );
289293 auto timestampSize = g_pFntRodin->CalcTextSizeA (fontSize, FLT_MAX, 0 , buffer);
290294
291295 // Draw timestamp text.
0 commit comments