Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/lobby/lobby.js
Show First 20 Lines • Show All 1,451 Lines • ▼ Show 20 Lines | (rating ? sprintf( | ||||
"rating": rating | "rating": rating | ||||
}) : playername | }) : playername | ||||
), | ), | ||||
getPlayerColor(playername.replace(g_ModeratorPrefix, ""))); | getPlayerColor(playername.replace(g_ModeratorPrefix, ""))); | ||||
} | } | ||||
function senderFont(text) | function senderFont(text) | ||||
{ | { | ||||
return '[font="' + g_SenderFont + '"]' + text + "[/font]"; | return fontText(text, g_SenderFont); | ||||
} | } | ||||
function formatWinRate(attr) | function formatWinRate(attr) | ||||
{ | { | ||||
if (!attr.totalGamesPlayed) | if (!attr.totalGamesPlayed) | ||||
return translateWithContext("Used for an undefined winning rate", "-"); | return translateWithContext("Used for an undefined winning rate", "-"); | ||||
return sprintf(translate("%(percentage)s%%"), { | return sprintf(translate("%(percentage)s%%"), { | ||||
"percentage": (attr.wins / attr.totalGamesPlayed * 100).toFixed(2) | "percentage": (attr.wins / attr.totalGamesPlayed * 100).toFixed(2) | ||||
}); | }); | ||||
} | } |
Wildfire Games · Phabricator