Quantcast Thousand separator for XP/AP bar text - WoWInterface
Thread Tools Display Modes
03-08-19, 05:26 AM   #1
sh77
A Kobold Labourer
Join Date: Nov 2016
Posts: 1
Thousand separator for XP/AP bar text

Since 8.0 (I believe) the default Blizzard XP/AP bar text no longer displays a thousand separator ("," or ". " depending on your region I suppose). Nor does it show the percentage completion in brackets after the number.

I know there are a lot of addons to replace the standard XP/AP display functionality, but does anyone know of an addon or a way to get the thousand separator and % display back? Call me weird, but this a feature I miss quite a bit.

Thanks
  Reply With Quote
03-08-19, 09:44 AM   #2
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,117
BreakupLargeNumbers has been broken for a while even though it is still used in the stock UI code and not yet been replaced by FormatLargeNumber.

If you are putting it into an addon of your own that loads at startup then something like:

Lua Code:
  1. hooksecurefunc(StatusTrackingBarManager, "AddBarFromTemplate", function(self, frameType, template)
  2.     if template == "AzeriteBarTemplate" then
  3.         hooksecurefunc(StatusTrackingBarManager.bars[5], "UpdateOverlayFrameText", function(self)
  4.             if ( self.OverlayFrame.Text:IsShown() ) then
  5.                 local xp = self.StatusBar:GetAnimatedValue();
  6.                 local _, xpForNextPoint = self.StatusBar:GetMinMaxValues();
  7.                 if ( xpForNextPoint > 0 ) then
  8.                     self.OverlayFrame.Text:SetFormattedText(ARTIFACT_POWER_BAR, FormatLargeNumber(xp), FormatLargeNumber(xpForNextPoint).." "..math.floor((xp/xpForNextPoint)*100).."%");
  9.                 end
  10.             end
  11.         end)
  12.     end
  13. end)
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 03-08-19 at 09:50 AM.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » Thousand separator for XP/AP bar text

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off