Thread: artifact xp bar
View Single Post
08-31-16, 09:38 AM   #5
Uitat
A Chromatic Dragonspawn
 
Uitat's Avatar
AddOn Author - Click to view addons
Join Date: May 2011
Posts: 162
ok i have no errors but also have no status

im using Dominos to show as reference...
what i am expecting to happen here ... in the box with the stripes is what you se just above it(dominos artifact bar)
what im getting is nothing,
there is no errors, but also no info...
---- See Attached Thumbnail below ----
code
Lua Code:
  1. local derArtifactBar = CreateFrame("Statusbar", "derArtifactBar",artifactFrame)
  2. derArtifactBar:SetPoint("CENTER", 0, 0)
  3. derArtifactBar:SetHeight(17)
  4. derArtifactBar:SetWidth(artifactFrame:GetWidth() * .968)
  5.  
  6.  
  7. derArtifactBar:SetBackdrop({
  8.     bgFile =  "Interface\\AddOns\\_Deranjata\\media\\cast\\Lines",
  9. --  edgeFile = "Interface\\BUTTONS\\WHITE8X8", edgeSize = 1,
  10.     insets = { left = 1, right = 1, top = 1, bottom = 1 }
  11. })
  12. derArtifactBar:SetBackdropColor(0.1, 0.1, 0.1)
  13. derArtifactBar:SetBackdropBorderColor(0.6, 0.6, 0.6)
  14.  
  15.  
  16.  
  17.  
  18. derArtifactBar:RegisterEvent("PLAYER_ENTERING_WORLD")
  19. derArtifactBar:RegisterEvent("ARTIFACT_XP_UPDATE")
  20. derArtifactBar:RegisterEvent("UNIT_INVENTORY_CHANGED")
  21. derArtifactBar:SetScript("OnEvent", function(self, event, ...)
  22.         local showArtifact = HasArtifactEquipped()
  23.         if not showArtifact then
  24.             if self:IsShown() then
  25.                 self:Hide()
  26.             end
  27.             return
  28.         end
  29.         if not self:IsShown() then
  30.             self:Show()
  31.         end
  32.        
  33.         local itemID, altItemID, name, icon, totalXP, pointsSpent = C_ArtifactUI.GetEquippedArtifactInfo()
  34.         local numPoints, artifactXP, xpForNextPoint = MainMenuBar_GetNumArtifactTraitsPurchasableFromXP(pointsSpent, totalXP)
  35.         self:SetValue(artifactXP/xpForNextPoint)
  36.  
  37.     end)
Attached Thumbnails
Click image for larger version

Name:	artifactBar.png
Views:	271
Size:	220.7 KB
ID:	8801  
__________________
  Reply With Quote