Thread Tools Display Modes
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
08-08-16, 04:14 PM   #2
myno
A Defias Bandit
AddOn Author - Click to view addons
Join Date: Nov 2009
Posts: 3
I can only imagine that you did not embed the ArtifactPower module properly, tried it out with your oUF_Diablo and the artifact power bar worked just fine.

  Reply With Quote
08-08-16, 05:19 PM   #3
Joker119
A Flamescale Wyrmkin
 
Joker119's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 113
Originally Posted by myno View Post
I can only imagine that you did not embed the ArtifactPower module properly, tried it out with your oUF_Diablo and the artifact power bar worked just fine.

That's weird..
How did you integrate the ArtifactPower? Did you put that code in the bars.lua file or somewhere else?
Can you provide a copy of your oUF_Diablo folder so I can compare them? That's very odd.
  Reply With Quote
08-08-16, 05:57 PM   #4
myno
A Defias Bandit
AddOn Author - Click to view addons
Join Date: Nov 2009
Posts: 3
Simply dropped the oUF_ArtifactPower.lua file in the modules folder and added it in the .toc where all the other oUF modules are listed too.
  Reply With Quote
08-08-16, 07:53 PM   #5
Joker119
A Flamescale Wyrmkin
 
Joker119's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 113
Originally Posted by myno View Post
Simply dropped the oUF_ArtifactPower.lua file in the modules folder and added it in the .toc where all the other oUF modules are listed too.
WOOOW

That was stupid...

I did everything except update the toc file.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Issues implementing Artifact Power bar


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