View Single Post
02-24-16, 03:42 AM   #3
jeAz_
A Deviate Faerie Dragon
Join Date: Feb 2016
Posts: 13
Originally Posted by zork View Post
I did my own classbars for oUF_Diablo. They can be found under modules.
https://github.com/zorker/rothui/tre...Diablo/modules

Example for Harmony:
https://github.com/zorker/rothui/blo...UF_Harmony.lua

On top of that make sure to check out the wow api changes for legion regarding that topic:
http://www.wowinterface.com/forums/s...ad.php?t=53140

Taking a look at rClassBars may help out aswell.
http://www.wowinterface.com/download...ClassBars.html
Hi zork,

Thank you for those nice references, and let me ask step by step.


About Default "classicon.lua":

1. On default oUF's default "classicon.lua" there is "PreUpdate" and "PostUpdate" functions. I understand when they are triggered, but ain't sure of what they actually process. Could you please explain me, if you know about them?


About your "oUF_Harmony.lua":

2. On your "oUF_Harmony.lua", it contains the following codes:
Lua Code:
  1. local w = 64*(max+2)
  2. bar:SetWidth(w)
  3. for i = 1, bar.maxOrbs do
  4.   local orb = self.Harmony[i]
  5.   if i > max then
  6.      if orb:IsShown() then orb:Hide() end
  7.   else
  8.     if not orb:IsShown() then orb:Show() end
  9.   end
  10. end
  11. for i = 1, max do
  12.   local orb = self.Harmony[i]
  13.   local full = num/max
  14.   if(i <= num) then
  15.     if full == 1 then
  16.       orb.fill:SetVertexColor(1,0,0)
  17.       orb.glow:SetVertexColor(1,0,0)
  18.     else
  19.       orb.fill:SetVertexColor(bar.color.r,bar.color.g,bar.color.b)
  20.       orb.glow:SetVertexColor(bar.color.r,bar.color.g,bar.color.b)
  21.     end
  22.     orb.fill:Show()
  23.     orb.glow:Show()
  24.     orb.highlight:Show()
  25.   else
  26.     orb.fill:Hide()
  27.     orb.glow:Hide()
  28.     orb.highlight:Hide()
  29.   end
  30. end

If I'm going set the appearance of "Chi Orbs" outside of this module, do I still have to have

local w = 64*(max+2)
bar:SetWidth(w)

and

second "for" loop?

3. Where does "bar.maxOrbs" come from?

4. How does "ForceUpdate" and "Path" functions work?

5. On "ForceUpdate" function and "Enable" function, there is "element.__owner". Does "__" mean something special in Lua when you are indexing an element from table?




Please excuse me if I'm asking too many questions.
  Reply With Quote