Ticket #3205: lobby_colors_fix.patch
File lobby_colors_fix.patch, 1.5 KB (added by , 9 years ago) |
---|
-
gui/lobby/lobby.js
old new 394 394 // 'waiting' games are highlighted in orange, 'running' in red, and 'init' in green. 395 395 let name; 396 396 if (g.state == 'init') 397 name = '[color="0 1250"]' + g.name + '[/color]';397 name = '[color="0 219 0"]' + g.name + '[/color]'; 398 398 else if (g.state == 'waiting') 399 399 name = '[color="255 127 0"]' + g.name + '[/color]'; 400 400 else 401 name = '[color="2 550 0"]' + g.name + '[/color]';401 name = '[color="219 0 0"]' + g.name + '[/color]'; 402 402 list_name.push(name); 403 403 list_ip.push(g.ip); 404 404 list_mapName.push(translate(g.niceMapName)); … … 443 443 switch (presence) 444 444 { 445 445 case "playing": 446 color = "1 250 0";446 color = "191 0 0"; 447 447 status = translate("Busy"); 448 448 break; 449 449 case "gone": … … 452 452 status = translate("Away"); 453 453 break; 454 454 case "available": 455 color = "0 1250";455 color = "0 219 0"; 456 456 status = translate("Online"); 457 457 break; 458 458 case "offline": … … 1017 1017 // us much more variety if we generate in RGB. Unfortunately, enforcing that RGB values are a certain lightness is very difficult, so 1018 1018 // we convert to HSL to do the computation. Since our GUI code only displays RGB colors, we have to convert back. 1019 1019 var [h, s, l] = rgbToHsl(hash >> 24 & 0xFF, hash >> 16 & 0xFF, hash >> 8 & 0xFF); 1020 return hslToRgb(h, s, Math.max(0. 4, l)).join(" ");1020 return hslToRgb(h, s, Math.max(0.7, l)).join(" "); 1021 1021 } 1022 1022 1023 1023 function repeatString(times, string) {