Differential D3155 Diff 14521 ps/trunk/binaries/data/mods/public/gui/session/top_panel/CounterManager.js
Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/gui/session/top_panel/CounterManager.js
Show All 31 Lines | if (this.counters.length + 1 > panelCount) | ||||
throw "There are " + (this.counters.length + 1) + " resource counters to display, but only " + panelCount + " panel items!"; | throw "There are " + (this.counters.length + 1) + " resource counters to display, but only " + panelCount + " panel items!"; | ||||
let id = "[" + this.counters.length + "]"; | let id = "[" + this.counters.length + "]"; | ||||
this.counters.push( | this.counters.push( | ||||
new type( | new type( | ||||
resCode, | resCode, | ||||
Engine.GetGUIObjectByName("resource" + id), | Engine.GetGUIObjectByName("resource" + id), | ||||
Engine.GetGUIObjectByName("resource" + id + "_icon"), | Engine.GetGUIObjectByName("resource" + id + "_icon"), | ||||
Engine.GetGUIObjectByName("resource" + id + "_count"))); | Engine.GetGUIObjectByName("resource" + id + "_count"), | ||||
Engine.GetGUIObjectByName("resource" + id + "_stats"))); | |||||
} | } | ||||
init() | init() | ||||
{ | { | ||||
horizontallySpaceObjects("resourceCounts", this.counters.length); | horizontallySpaceObjects("resourceCounts", this.counters.length); | ||||
hideRemaining("resourceCounts", this.counters.length); | hideRemaining("resourceCounts", this.counters.length); | ||||
for (let counter of this.counters) | for (let counter of this.counters) | ||||
▲ Show 20 Lines • Show All 84 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator