Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/gui/summary/layout.js
Show First 20 Lines • Show All 110 Lines • ▼ Show 20 Lines | "headings": [ | ||||
"caption": sprintf(translate("Tributes \n(%(sent)s / %(received)s)"), | "caption": sprintf(translate("Tributes \n(%(sent)s / %(received)s)"), | ||||
{ | { | ||||
"sent": getColoredTypeTranslation("sent"), | "sent": getColoredTypeTranslation("sent"), | ||||
"received": getColoredTypeTranslation("received") | "received": getColoredTypeTranslation("received") | ||||
}), | }), | ||||
"yStart": 16, | "yStart": 16, | ||||
"width": 121 | "width": 121 | ||||
}, | }, | ||||
{ "identifier": "treasuresCollected", "caption": translate("Treasures collected"), "yStart": 16, "width": 100 }, | { "identifier": "treasuresCollected", "caption": translate("Treasures collected"), "yStart": 16, "width": 85 }, | ||||
{ "identifier": "loot", "caption": translate("Loot"), "yStart": 16, "width": 100 } | { "identifier": "loot", "caption": translate("Loot"), "yStart": 16, "width": 85 }, | ||||
{ "identifier": "livestock", "caption": translate("Livestock bred"), "yStart": 16, "width": 85 } | |||||
], | ], | ||||
"titleHeadings": [ | "titleHeadings": [ | ||||
{ | { | ||||
"caption": sprintf(translate("Resource Statistics (%(gathered)s / %(used)s)"), | "caption": sprintf(translate("Resource Statistics (%(gathered)s / %(used)s)"), | ||||
{ | { | ||||
"gathered": getColoredTypeTranslation("gathered"), | "gathered": getColoredTypeTranslation("gathered"), | ||||
"used": getColoredTypeTranslation("used") | "used": getColoredTypeTranslation("used") | ||||
}), | }), | ||||
"yStart": 16, | "yStart": 16, | ||||
"width": 100 * g_ResourceData.GetCodes().length + 110 | "width": 100 * g_ResourceData.GetCodes().length + 110 | ||||
}, | }, | ||||
], | ], | ||||
"counters": [ | "counters": [ | ||||
{ "width": 110, "fn": calculateTotalResources, "verticalOffset": 12 }, | { "width": 110, "fn": calculateTotalResources, "verticalOffset": 12 }, | ||||
...g_ResourceData.GetCodes().map(code => ({ | ...g_ResourceData.GetCodes().map(code => ({ | ||||
"fn": calculateResources, | "fn": calculateResources, | ||||
"verticalOffset": 12, | "verticalOffset": 12, | ||||
"width": 100 | "width": 100 | ||||
})), | })), | ||||
{ "width": 121, "fn": calculateTributeSent, "verticalOffset": 12 }, | { "width": 121, "fn": calculateTributeSent, "verticalOffset": 12 }, | ||||
{ "width": 100, "fn": calculateTreasureCollected, "verticalOffset": 12 }, | { "width": 85, "fn": calculateTreasureCollected, "verticalOffset": 12 }, | ||||
{ "width": 100, "fn": calculateLootCollected, "verticalOffset": 12 } | { "width": 85, "fn": calculateLootCollected, "verticalOffset": 12 }, | ||||
{ "width": 85, "fn": calculateLivestockTrained, "verticalOffset": 12 } | |||||
], | ], | ||||
"teamCounterFn": calculateResourcesTeam | "teamCounterFn": calculateResourcesTeam | ||||
}, | }, | ||||
"market": { | "market": { | ||||
"caption": translate("Market"), | "caption": translate("Market"), | ||||
"headings": [ | "headings": [ | ||||
{ "identifier": "playername", "caption": translate("Player name"), "yStart": 26, "width": 200 }, | { "identifier": "playername", "caption": translate("Player name"), "yStart": 26, "width": 200 }, | ||||
...g_ResourceData.GetResources().map(res => { | ...g_ResourceData.GetResources().map(res => { | ||||
▲ Show 20 Lines • Show All 228 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator