Index: ps/trunk/binaries/data/mods/public/gui/session/ResearchProgress.js =================================================================== --- ps/trunk/binaries/data/mods/public/gui/session/ResearchProgress.js +++ ps/trunk/binaries/data/mods/public/gui/session/ResearchProgress.js @@ -55,6 +55,7 @@ this.sprite = Engine.GetGUIObjectByName("researchStartedIcon[" + i + "]"); this.progress = Engine.GetGUIObjectByName("researchStartedProgressSlider[" + i + "]"); this.timeRemaining = Engine.GetGUIObjectByName("researchStartedTimeRemaining[" + i + "]"); + this.paused = Engine.GetGUIObjectByName("researchPausedIcon[" + i + "]"); this.buttonHeight = this.button.size.bottom - this.button.size.top; this.buttonTop = this.Margin + (this.Margin + this.buttonHeight) * i; @@ -68,13 +69,18 @@ this.researcher = researchStatus.researcher; let template = GetTechnologyData(techName, g_Players[g_ViewedPlayer].civ); - this.sprite.sprite = "stretched:" + this.PortraitDirectory + template.icon; + let modifier = "stretched:"; + if (researchStatus.paused) + modifier += "color:0 0 0 127:grayscale:"; + this.sprite.sprite = modifier + this.PortraitDirectory + template.icon; let size = this.button.size; size.top = offset + this.buttonTop; size.bottom = size.top + this.buttonHeight; this.button.size = size; this.button.tooltip = getEntityNames(template); + if (researchStatus.paused) + this.button.tooltip += "\n" + translate(this.PausedResearchString); this.button.hidden = false; size = this.progress.size; @@ -85,6 +91,8 @@ Engine.FormatMillisecondsIntoDateStringGMT( researchStatus.timeRemaining, translateWithContext("countdown format", this.CountdownFormat)); + + this.paused.hidden = !researchStatus.paused; } onPress() @@ -107,3 +115,6 @@ * This format is used when displaying the remaining time of the currently viewed techs in research. */ 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. +ResearchProgressButton.prototype.PausedResearchString = markForTranslation("(This item is paused.)"); Index: ps/trunk/binaries/data/mods/public/gui/session/ResearchProgress.xml =================================================================== --- ps/trunk/binaries/data/mods/public/gui/session/ResearchProgress.xml +++ ps/trunk/binaries/data/mods/public/gui/session/ResearchProgress.xml @@ -7,6 +7,7 @@ + Index: ps/trunk/binaries/data/mods/public/gui/session/input.js =================================================================== --- ps/trunk/binaries/data/mods/public/gui/session/input.js +++ ps/trunk/binaries/data/mods/public/gui/session/input.js @@ -1521,7 +1521,8 @@ "type": "train", "template": trainEntType, "count": 1, - "entities": buildingsForTraining + "entities": buildingsForTraining, + "pushFront": Engine.HotkeyIsPressed("session.pushorderfront") }); } } @@ -1579,7 +1580,8 @@ "type": "train", "entities": appropriateBuildings.slice(0, buildingsCountToTrainFullBatch), "template": g_BatchTrainingType, - "count": batchedSize + "count": batchedSize, + "pushFront": Engine.HotkeyIsPressed("session.pushorderfront") }); // Train remainer in one more structure. @@ -1589,7 +1591,8 @@ "type": "train", "entities": [appropriateBuildings[buildingsCountToTrainFullBatch]], "template": g_BatchTrainingType, - "count": remainer + "count": remainer, + "pushFront": Engine.HotkeyIsPressed("session.pushorderfront") }); } else @@ -1597,7 +1600,8 @@ "type": "train", "entities": appropriateBuildings, "template": g_BatchTrainingType, - "count": batchedSize + "count": batchedSize, + "pushFront": Engine.HotkeyIsPressed("session.pushorderfront") }); } Index: ps/trunk/binaries/data/mods/public/gui/session/selection_panels.js =================================================================== --- ps/trunk/binaries/data/mods/public/gui/session/selection_panels.js +++ ps/trunk/binaries/data/mods/public/gui/session/selection_panels.js @@ -590,10 +590,22 @@ guiObject.size = size; data.button.enabled = controlsPlayer(data.player); + + Engine.GetGUIObjectByName("unitQueuePausedIcon[" + data.i + "]").hidden = !queuedItem.paused; + if (queuedItem.paused) + // Translation: String displayed when the research is paused. E.g. by being garrisoned or when not the first item in the queue. + data.button.tooltip += "\n" + translate("(This item is paused.)"); } if (template.icon) - data.icon.sprite = (data.item.ghost ? "grayscale:" : "") + "stretched:session/portraits/" + template.icon; + { + let modifier = "stretched:"; + if (queuedItem.paused) + modifier += "color:0 0 0 127:grayscale:"; + else if (data.item.ghost) + modifier += "grayscale:"; + data.icon.sprite = modifier + "session/portraits/" + template.icon; + } const showTemplateFunc = () => { showTemplateDetails(data.item.queuedItem.unitTemplate || data.item.queuedItem.technologyTemplate, data.playerState.civ); }; Index: ps/trunk/binaries/data/mods/public/gui/session/selection_panels_helpers.js =================================================================== --- ps/trunk/binaries/data/mods/public/gui/session/selection_panels_helpers.js +++ ps/trunk/binaries/data/mods/public/gui/session/selection_panels_helpers.js @@ -272,7 +272,8 @@ Engine.PostNetworkCommand({ "type": "research", "entity": entity, - "template": researchType + "template": researchType, + "pushFront": Engine.HotkeyIsPressed("session.pushorderfront") }); } Index: ps/trunk/binaries/data/mods/public/gui/session/selection_panels_right/queue_panel.xml =================================================================== --- ps/trunk/binaries/data/mods/public/gui/session/selection_panels_right/queue_panel.xml +++ ps/trunk/binaries/data/mods/public/gui/session/selection_panels_right/queue_panel.xml @@ -12,8 +12,9 @@