accueil : borner la version renvoyée par le ping (32 car.) avant la troncature par image

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cette révision appartient à :
Théo GastineletClaude Opus 5.5 a révisé 2026-10-18 02:19:04 +02:00
1 Parent a354365558
révision 7d7ae54080
1 fichier modifié
+2
+2
Voir le fichier
@@ -178,6 +178,8 @@ public class AccueilScreen extends EcranGastinel {
if (i > 0) g.fill(cx - 8, cy, cx - 7, cy + 40, Charte.FILET);
Charte.etiquette(g, this.font, cases[i][0], cx, cy + 10, Charte.DOUX);
String v = cases[i][1];
// Valeur venue du serveur (ping) : bornée avant la boucle, sinon une chaîne énorme la rend coûteuse à chaque image.
if (v.length() > 32) v = v.substring(0, 32);
int lv = i < 2 ? lc - 12 : larg - 2 * lc;
while (v.length() > 1 && this.font.width(Charte.titre(v)) * 1.5f > lv) v = v.substring(0, v.length() - 1);
Charte.grandTitre(g, this.font, v, cx, cy + 24, 1.5f, Charte.ENCRE);