Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js
Show First 20 Lines • Show All 949 Lines • ▼ Show 20 Lines | var g_PlayerMiscElements = { | ||||
"playerColor": { | "playerColor": { | ||||
"sprite": (playerIdx) => "color:" + rgbToGuiColor(g_GameAttributes.settings.PlayerData[playerIdx].Color) + " 100", | "sprite": (playerIdx) => "color:" + rgbToGuiColor(g_GameAttributes.settings.PlayerData[playerIdx].Color) + " 100", | ||||
}, | }, | ||||
"playerConfig": { | "playerConfig": { | ||||
"hidden": (playerIdx) => !g_GameAttributes.settings.PlayerData[playerIdx].AI, | "hidden": (playerIdx) => !g_GameAttributes.settings.PlayerData[playerIdx].AI, | ||||
"onPress": (playerIdx) => function() { | "onPress": (playerIdx) => function() { | ||||
openAIConfig(playerIdx); | openAIConfig(playerIdx); | ||||
}, | }, | ||||
"tooltip": (playerIdx) => sprintf(translate("Configure AI: %(difficulty)s %(behavior)s %(name)s."), { | "tooltip": (playerIdx) => sprintf(translate("Configure AI: %(description)s."), { | ||||
"name": translateAIName(g_GameAttributes.settings.PlayerData[playerIdx].AI), | "description": translateAISettings(g_GameAttributes.settings.PlayerData[playerIdx]) | ||||
"difficulty": translateAIDifficulty(g_GameAttributes.settings.PlayerData[playerIdx].AIDiff), | |||||
"behavior": translateAIBehavior(g_GameAttributes.settings.PlayerData[playerIdx].AIBehavior), | |||||
}), | }), | ||||
}, | }, | ||||
}; | }; | ||||
/** | /** | ||||
* Initializes some globals without touching the GUI. | * Initializes some globals without touching the GUI. | ||||
* | * | ||||
* @param {Object} attribs - context data sent by the lobby / mainmenu | * @param {Object} attribs - context data sent by the lobby / mainmenu | ||||
▲ Show 20 Lines • Show All 1,484 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator