Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/session/ResearchProgress.js
/** | /** | ||||
* This class is responsible for displaying the currently researched technologies in an overlay. | * This class is responsible for displaying the currently researched technologies in an overlay. | ||||
*/ | */ | ||||
class ResearchProgress | class ResearchProgress | ||||
{ | { | ||||
constructor(playerViewControl, selection) | constructor(playerViewControl, selection) | ||||
{ | { | ||||
this.buttons = Engine.GetGUIObjectByName("researchStartedButtons").children; | this.buttons = Engine.GetGUIObjectByName("researchStartedButtons").children; | ||||
this.buttonHandlers = this.buttons.map((button, i) => new ResearchProgressButton(selection, i)); | this.buttonHandlers = this.buttons.map((button, i) => new ResearchProgressButton(selection, i)); | ||||
Lint: no-use-before-define: 'ResearchProgressButton' was used before it was defined. | |||||
/** | /** | ||||
* Top coordinate of the research list. | * Top coordinate of the research list. | ||||
* Changes depending on the number of displayed counters. | * Changes depending on the number of displayed counters. | ||||
*/ | */ | ||||
this.topOffset = 0; | this.topOffset = 0; | ||||
let updater = this.updateResearchProgress.bind(this); | let updater = this.updateResearchProgress.bind(this); | ||||
▲ Show 20 Lines • Show All 94 Lines • ▼ Show 20 Lines | |||||
ResearchProgressButton.prototype.PortraitDirectory = "session/portraits/"; | ResearchProgressButton.prototype.PortraitDirectory = "session/portraits/"; | ||||
/** | /** | ||||
* This format is used when displaying the remaining time of the currently viewed techs in research. | * This format is used when displaying the remaining time of the currently viewed techs in research. | ||||
*/ | */ | ||||
ResearchProgressButton.prototype.CountdownFormat = markForTranslationWithContext("countdown format", "m:ss"); | ResearchProgressButton.prototype.CountdownFormat = markForTranslationWithContext("countdown format", "m:ss"); | ||||
// Translation: String displayed when the research is paused. E.g. by being garrisoned or when not the first item in the queue. | // Translation: String displayed when the research is paused. E.g. by being garrisoned or when not the first item in the queue. | ||||
ResearchProgressButton.prototype.PausedResearchString = markForTranslation("(This item is paused.)"); | ResearchProgressButton.prototype.PausedResearchString = markForTranslation("This item is paused."); |
Wildfire Games · Phabricator
'ResearchProgressButton' was used before it was defined.