mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-24 22:52:18 +00:00
Remove pointless content from counter tooltips
This removes the static text "Gatherers: current" from the resource and population counter tooltips. This string was static and only changed its color depending on whether units were assigned to collect a certain resource. That information is however already available in the counter display itself.
This commit is contained in:
@@ -29,7 +29,7 @@ class CounterPopulation
|
||||
|
||||
this.panel.tooltip =
|
||||
setStringTags(translate(this.PopulationTooltip), CounterManager.ResourceTitleTags) +
|
||||
getAllyStatTooltip(this.getTooltipData.bind(this)) + "\n" + coloredText(this.CurrentGatherersTooltip, total ? this.DefaultTotalGatherersColor : this.DefaultTotalGatherersColorZero);
|
||||
getAllyStatTooltip(this.getTooltipData.bind(this));
|
||||
}
|
||||
|
||||
getTooltipData(playerState, playername)
|
||||
@@ -64,11 +64,6 @@ CounterPopulation.prototype.PopulationTooltip = markForTranslation("Population:
|
||||
|
||||
CounterPopulation.prototype.AllyPopulationTooltip = markForTranslation("%(popCount)s/%(popLimit)s (%(popMax)s)");
|
||||
|
||||
/**
|
||||
* Storing the translated and formatted gatherer string in the prototype.
|
||||
*/
|
||||
CounterPopulation.prototype.CurrentGatherersTooltip = setStringTags(translate("Gatherers: current"), {"font": "sans-bold-16"});
|
||||
|
||||
/**
|
||||
* Color to highlight the total number of gatherers at zero.
|
||||
*/
|
||||
|
||||
@@ -28,7 +28,7 @@ class CounterResource
|
||||
this.panel.tooltip =
|
||||
setStringTags(resourceNameFirstWord(this.resCode), CounterManager.ResourceTitleTags) +
|
||||
description +
|
||||
getAllyStatTooltip(this.getTooltipData.bind(this)) + "\n" + coloredText(CounterPopulation.prototype.CurrentGatherersTooltip, gatherers ? this.DefaultResourceGatherersColor : this.DefaultResourceGatherersColorZero);
|
||||
getAllyStatTooltip(this.getTooltipData.bind(this));
|
||||
}
|
||||
|
||||
getTooltipData(playerState, playername)
|
||||
|
||||
Reference in New Issue
Block a user