Fix pop indication of paused items.
Reported by @Langbart at 75aa2091b7
.
Differential revision: https://code.wildfiregames.com/D4308
Comments by: @Langbart, @marder, @Silier
Fixes #6452
This was SVN commit r26739.
This commit is contained in:
parent
02b87cdb46
commit
12ac4c7714
@ -117,4 +117,4 @@ ResearchProgressButton.prototype.PortraitDirectory = "session/portraits/";
|
||||
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.)");
|
||||
ResearchProgressButton.prototype.PausedResearchString = markForTranslation("This item is paused.");
|
||||
|
@ -594,7 +594,7 @@ g_SelectionPanels.Queue = {
|
||||
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.)");
|
||||
data.button.tooltip += "\n" + translate("This item is paused.");
|
||||
}
|
||||
|
||||
if (template.icon)
|
||||
|
@ -14,7 +14,7 @@
|
||||
<object name="unitQueueIcon[n]" ghost="true" type="image" size="3 3 35 35"/>
|
||||
<object name="unitQueueProgressSlider[n]" type="image" sprite="queueProgressSlider" ghost="true" size="3 3 35 35"/>
|
||||
<object name="unitQueueCount[n]" ghost="true" style="groupIconsText" type="text" z="20"/>
|
||||
<object name="unitQueuePausedIcon[n]" ghost="true" type="image" sprite="stretched:session/icons/stop.png" size="3 3 35 35"/>
|
||||
<object name="unitQueuePausedIcon[n]" hidden="true" ghost="true" type="image" sprite="stretched:session/icons/stop.png" size="3 3 35 35"/>
|
||||
</object>
|
||||
</repeat>
|
||||
</object>
|
||||
|
@ -350,7 +350,13 @@ Trainer.prototype.Item.prototype.Progress = function(allocatedTime)
|
||||
|
||||
Trainer.prototype.Item.prototype.Pause = function()
|
||||
{
|
||||
this.paused = true;
|
||||
if (this.started)
|
||||
this.paused = true;
|
||||
else if (this.missingPopSpace)
|
||||
{
|
||||
delete this.missingPopSpace;
|
||||
QueryOwnerInterface(this.trainer)?.UnBlockTraining();
|
||||
}
|
||||
};
|
||||
|
||||
Trainer.prototype.Item.prototype.Unpause = function()
|
||||
|
Loading…
Reference in New Issue
Block a user