Ticket #3508: t3508_v3.patch
File t3508_v3.patch, 1.3 KB (added by , 8 years ago) |
---|
-
gamesetup.js
115 115 const g_UnassignedColor = "140 140 140"; 116 116 117 117 /** 118 * Highlight observer players in the dropdownlist. 119 */ 120 const g_UnassignedPlayerColor = "30 20 20" 121 122 /** 118 123 * Highlight ready players. 119 124 */ 120 125 const g_ReadyColor = "green"; … … 1412 1462 updatePlayerList(); 1413 1463 } 1414 1464 1465 function colorizeTextWithColor(name, color) 1466 { 1467 return "[color=\""+ color + "\"]" + name + "[/color]"; 1468 } 1469 1415 1470 function updatePlayerList() 1416 1471 { 1417 1472 g_IsInGuiUpdate = true; … … 1427 1482 { 1428 1483 let player = g_PlayerAssignments[guid].player; 1429 1484 1430 hostNameList.push(g_PlayerAssignments[guid].name); 1485 if( player != -1 ) 1486 hostNameList.push( g_PlayerAssignments[guid].name ); 1487 else 1488 hostNameList.push( colorizeTextWithColor( g_PlayerAssignments[guid].name, g_UnassignedPlayerColor ) ); 1489 1431 1490 hostGuidList.push(guid); 1432 1491 assignments[player] = hostNameList.length-1; 1433 1492 … … 1451 1510 } 1452 1511 1453 1512 noAssignment = hostNameList.length; 1454 hostNameList.push( "[color=\""+ g_UnassignedColor + "\"]" + translate("Unassigned"));1513 hostNameList.push( colorizeTextWithColor(translate("Unassigned"), g_UnassignedColor ) ); 1455 1514 hostGuidList.push(""); 1456 1515 1457 1516 for (let i = 0; i < g_MaxPlayers; ++i)