Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/common/gamedescription.js
Context not available. | |||||
var g_BuddySymbol = '•'; | var g_BuddySymbol = '•'; | ||||
/** | /** | ||||
* Denotes which players are a lobby the user | |||||
*/ | |||||
var g_UserSymbol = "‣"; | |||||
/** | |||||
* Singleplayer Name | |||||
*/ | |||||
let g_UserSinglePlayer = Engine.ConfigDB_GetValue("user", "playername.singleplayer") || ""; | |||||
/** | |||||
* Multiplayer Name | |||||
*/ | |||||
let g_UserMultiPlayer = Engine.ConfigDB_GetValue("user", "playername.multiplayer") || ""; | |||||
function isUser(nick) | |||||
{ | |||||
return (nick == g_UserMultiPlayer || nick == g_UserSinglePlayer); | |||||
} | |||||
/** | |||||
* Returns map description and preview image or placeholder. | * Returns map description and preview image or placeholder. | ||||
*/ | */ | ||||
function getMapDescriptionAndPreview(mapType, mapName) | function getMapDescriptionAndPreview(mapType, mapName) | ||||
Context not available. | |||||
(isAI ? "white" : getPlayerColor(playerData.Name)) : | (isAI ? "white" : getPlayerColor(playerData.Name)) : | ||||
rgbToGuiColor(playerData.Color || g_Settings.PlayerDefaults[playerIdx].Color)) + | rgbToGuiColor(playerData.Color || g_Settings.PlayerDefaults[playerIdx].Color)) + | ||||
'"]' + | '"]' + | ||||
(g_Buddies.indexOf(splitRatingFromNick(playerData.Name)[0]) != -1 ? g_BuddySymbol + " " : "") + | (isUser(splitRatingFromNick(playerData.Name)[0]) ? g_UserSymbol + " " : | ||||
g_Buddies.indexOf(splitRatingFromNick(playerData.Name)[0]) != -1 ? g_BuddySymbol + " " : "") + | |||||
escapeText(playerData.Name) + | escapeText(playerData.Name) + | ||||
"[/color]", | "[/color]", | ||||
Context not available. |
Wildfire Games · Phabricator