Index: ps/trunk/binaries/data/mods/public/gui/session/top_panel/CounterPopulation.js =================================================================== --- ps/trunk/binaries/data/mods/public/gui/session/top_panel/CounterPopulation.js +++ ps/trunk/binaries/data/mods/public/gui/session/top_panel/CounterPopulation.js @@ -23,13 +23,13 @@ for (let resCode of g_ResourceData.GetCodes()) total += playerState.resourceGatherers[resCode]; - this.stats.caption = total ? coloredText(total, this.DefaultTotalGatherersColor) : 0; + this.stats.caption = coloredText(total, total ? this.DefaultTotalGatherersColor : this.DefaultTotalGatherersColorZero); this.isTrainingBlocked = playerState.trainingBlocked; this.panel.tooltip = setStringTags(translate(this.PopulationTooltip), CounterManager.ResourceTitleTags) + - getAllyStatTooltip(this.getTooltipData.bind(this)) + "\n" + this.CurrentGatherersTooltip; + getAllyStatTooltip(this.getTooltipData.bind(this)) + "\n" + coloredText(this.CurrentGatherersTooltip, total ? this.DefaultTotalGatherersColor : this.DefaultTotalGatherersColorZero); } getTooltipData(playerState, playername) @@ -68,10 +68,17 @@ * 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 gatherers. + * Color to highlight the total number of gatherers at zero. + */ +CounterPopulation.prototype.DefaultTotalGatherersColorZero = "200 200 200"; + +/** + * Color to highlight the total number of gatherers. */ CounterPopulation.prototype.DefaultTotalGatherersColor = "gold"; + /** * Colors to flash when pop limit reached. */ Index: ps/trunk/binaries/data/mods/public/gui/session/top_panel/CounterResource.js =================================================================== --- ps/trunk/binaries/data/mods/public/gui/session/top_panel/CounterResource.js +++ ps/trunk/binaries/data/mods/public/gui/session/top_panel/CounterResource.js @@ -17,7 +17,8 @@ this.count.caption = abbreviateLargeNumbers(Math.floor(playerState.resourceCounts[this.resCode])); let gatherers = playerState.resourceGatherers[this.resCode]; - this.stats.caption = gatherers ? coloredText(gatherers, this.DefaultResourceGatherersColor) : 0; + this.stats.caption = coloredText(gatherers, gatherers ? this.DefaultResourceGatherersColor : this.DefaultResourceGatherersColorZero); + // TODO: Set the tooltip only if hovered? let description = g_ResourceData.GetResource(this.resCode).description; @@ -27,7 +28,7 @@ this.panel.tooltip = setStringTags(resourceNameFirstWord(this.resCode), CounterManager.ResourceTitleTags) + description + - getAllyStatTooltip(this.getTooltipData.bind(this)) + "\n" + CounterPopulation.prototype.CurrentGatherersTooltip; + getAllyStatTooltip(this.getTooltipData.bind(this)) + "\n" + coloredText(CounterPopulation.prototype.CurrentGatherersTooltip, gatherers ? this.DefaultResourceGatherersColor : this.DefaultResourceGatherersColorZero); } getTooltipData(playerState, playername) @@ -41,6 +42,11 @@ } /** + * Color to highlight the resource gatherers at zero. + */ +CounterResource.prototype.DefaultResourceGatherersColorZero = "200 200 200"; + +/** * Color to highlight the resource gatherers. */ CounterResource.prototype.DefaultResourceGatherersColor = "gold"; Index: ps/trunk/binaries/data/mods/public/gui/session/top_panel/Counters.xml =================================================================== --- ps/trunk/binaries/data/mods/public/gui/session/top_panel/Counters.xml +++ ps/trunk/binaries/data/mods/public/gui/session/top_panel/Counters.xml @@ -1,12 +1,12 @@ - + - - + +