WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Search/Requests (https://www.wowinterface.com/forums/forumdisplay.php?f=6)
-   -   Thousand separator for XP/AP bar text (https://www.wowinterface.com/forums/showthread.php?t=57045)

sh77 03-08-19 05:26 AM

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

Fizzlemizz 03-08-19 09:44 AM

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)

Tuschel 10-18-19 03:09 PM

Hello. I got something similar. I've written my own addon. It's simply darking the WoW default UI and hiding parts I don't want shown. One of this hidden parts is the StatusBar, which is the new Bar for XP, AP and so on. Now I want either only the Text of this Bar shown or, if the first case isn't possible, a new Frame which is showing the XP/AP Progress in % as Text only.

Can you help me with that??


All times are GMT -6. The time now is 12:01 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI