Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/reference/structree/draw.js
Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | for (let stru of g_BuildList[g_SelectedCiv][pha]) | ||||
Engine.GetGUIObjectByName("phase["+i+"]_struct["+s+"]_icon").sprite = | Engine.GetGUIObjectByName("phase["+i+"]_struct["+s+"]_icon").sprite = | ||||
"stretched:session/portraits/"+stru.icon; | "stretched:session/portraits/"+stru.icon; | ||||
Engine.GetGUIObjectByName("phase["+i+"]_struct["+s+"]_icon").tooltip = | Engine.GetGUIObjectByName("phase["+i+"]_struct["+s+"]_icon").tooltip = | ||||
compileTooltip(stru); | compileTooltip(stru); | ||||
Engine.GetGUIObjectByName("phase["+i+"]_struct["+s+"]_name").caption = | Engine.GetGUIObjectByName("phase["+i+"]_struct["+s+"]_name").caption = | ||||
translate(stru.name.specific); | translate(g_SpecificNamesPrimary ? stru.name.specific : stru.name.generic); | ||||
setViewerOnPress("phase["+i+"]_struct["+s+"]_icon", stru.name.internal); | setViewerOnPress("phase["+i+"]_struct["+s+"]_icon", stru.name.internal); | ||||
thisEle.hidden = false; | thisEle.hidden = false; | ||||
for (let r in g_DrawLimits[pha].prodQuant) | for (let r in g_DrawLimits[pha].prodQuant) | ||||
{ | { | ||||
let p = 0; | let p = 0; | ||||
r = +r; // force int | r = +r; // force int | ||||
▲ Show 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | for (let trainer of g_TrainList[g_SelectedCiv]) | ||||
{ | { | ||||
error("\""+g_SelectedCiv+"\" has more unit trainers than can be supported by the current GUI layout"); | error("\""+g_SelectedCiv+"\" has more unit trainers than can be supported by the current GUI layout"); | ||||
break; | break; | ||||
} | } | ||||
trainer = g_ParsedData.units[trainer]; | trainer = g_ParsedData.units[trainer]; | ||||
Engine.GetGUIObjectByName("trainer["+t+"]_icon").sprite = "stretched:session/portraits/"+trainer.icon; | Engine.GetGUIObjectByName("trainer["+t+"]_icon").sprite = "stretched:session/portraits/"+trainer.icon; | ||||
Engine.GetGUIObjectByName("trainer["+t+"]_icon").tooltip = compileTooltip(trainer); | Engine.GetGUIObjectByName("trainer["+t+"]_icon").tooltip = compileTooltip(trainer); | ||||
Engine.GetGUIObjectByName("trainer["+t+"]_name").caption = translate(trainer.name.specific); | Engine.GetGUIObjectByName("trainer["+t+"]_name").caption = translate(g_SpecificNamesPrimary ? trainer.name.specific : trainer.name.generic); | ||||
setViewerOnPress("trainer["+t+"]_icon", trainer.name.internal); | setViewerOnPress("trainer["+t+"]_icon", trainer.name.internal); | ||||
thisEle.hidden = false; | thisEle.hidden = false; | ||||
let p = 0; | let p = 0; | ||||
if (trainer.production) | if (trainer.production) | ||||
for (let prodType in trainer.production) | for (let prodType in trainer.production) | ||||
for (let prod of trainer.production[prodType]) | for (let prod of trainer.production[prodType]) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 255 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator