Originally Posted by zork
|
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:
local w = 64*(max+2)
bar:SetWidth(w)
for i = 1, bar.maxOrbs do
local orb = self.Harmony[i]
if i > max then
if orb:IsShown() then orb:Hide() end
else
if not orb:IsShown() then orb:Show() end
end
end
for i = 1, max do
local orb = self.Harmony[i]
local full = num/max
if(i <= num) then
if full == 1 then
orb.fill:SetVertexColor(1,0,0)
orb.glow:SetVertexColor(1,0,0)
else
orb.fill:SetVertexColor(bar.color.r,bar.color.g,bar.color.b)
orb.glow:SetVertexColor(bar.color.r,bar.color.g,bar.color.b)
end
orb.fill:Show()
orb.glow:Show()
orb.highlight:Show()
else
orb.fill:Hide()
orb.glow:Hide()
orb.highlight:Hide()
end
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.