View Single Post
08-07-16, 03:38 PM   #1
Joker119
A Flamescale Wyrmkin
 
Joker119's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 113
Issues implementing Artifact Power bar

So on my Diablo oUF layout, I'm trying to add the Artifact Bar in preparation for Legion's release.

I found an oUF_ArtifactPower module that should allow me to do so, just like the oUF_Experiance and oUF_Reputation modules.

I can get the bar created, but for some reason when I register the bar to oUF as a ArtifactPower for the module to take over, it doesn't.

Here's a link to the module being used: http://www.wowinterface.com/download...factPower.html

And the code used to implement the bar:
Lua Code:
  1. --create the artifact bar
  2.    bars.createArtifactBar = function(self)
  3.     local cfg = self.cfg.artifactbar
  4.     if not cfg.show then return end
  5.  
  6.     local w, h = 360, 5
  7.  
  8.     local f = CreateFrame("StatusBar","oUF_DiabloArtifactBar",self)
  9.     f:SetFrameStrata("LOW")
  10.     f:SetFrameLevel(1)
  11.     f:SetSize(w,h)
  12.     f:SetPoint(cfg.pos.a1, cfg.pos.af, cfg.pos.a2, cfg.pos.x, cfg.pos.y)
  13.     f:SetScale(cfg.scale)
  14.     f:SetStatusBarTexture(cfg.texture)
  15.     f:SetStatusBarColor(1,1,1)
  16.     f:EnableMouse(true)
  17.  
  18.     func.applyDragFunctionality(f)
  19.    
  20.     local text = f:CreateFontString(nil,"OVERLAY")
  21.     text:SetPoint("CENTER")
  22.     text:SetFontObject(GameFontHighlight)
  23.     f.text = text
  24.  
  25.     local t = f:CreateTexture(nil,"BACKGROUND",nil,-8)
  26.     t:SetAllPoints(f)
  27.     t:SetTexture(cfg.texture)
  28.     t:SetVertexColor(0,0.7,0)
  29.     t:SetAlpha(0.3)
  30.     f.bg = t
  31.  
  32.     self.ArtifactPower = f
  33.    
  34.  
  35.   end

This is nearly a copy/paste of the reputation and experiance bar creation functions, changing a few things to match the ArtifactPower needs.
However, all that it does is create a statusbar that is locked at 100% full and the mouseover/text functions of the module have no effect on the bar.
If I copy/paste the example code he gives on the wiki, and add a texture to the bar, I get the same result, so I know it isn't related to the code I have here.

Last edited by Joker119 : 08-07-16 at 03:49 PM.
  Reply With Quote