@Game92,
Your code would be a lot easier to keep track off if you used the UnitSpecific and Shared sections, the if iterations probably slow down everything (only by a little).
Your shard section -> SetSize(230, -10)
You gave it a negative height, could be part of the issue.
HolyPower -> you didn't use an index in your for loop.
holyRune[i]
I can't help you with the eclipsebar though, I've got a feral druid lvl33, so no dual spec yet :P
I hope seeing my SoulShards code will help you some
Code:
-- SoulShards
if select(2, UnitClass("player")) == "WARLOCK" then
self.SoulShards = CreateFrame("Frame", nil, self)
self.SoulShards:SetSize(plWidth, 7)
self.SoulShards:SetPoint("TOPLEFT", self.Power, "BOTTOMLEFT", 0, -2)
self.SoulShards:SetPoint("TOPRIGHT", self.Power, "BOTTOMRIGHT", 0, -2)
for i = 1, SHARD_BAR_NUM_SHARDS do
self.SoulShards[i] = self.SoulShards:CreateTexture(nil, 'OVERLAY')
self.SoulShards[i]:SetSize((plWidth-2)/SHARD_BAR_NUM_SHARDS, 5)
self.SoulShards[i]:SetTexture(texture)
self.SoulShards[i]:SetVertexColor(0, 144/255, 1)
if (i == 1) then
self.SoulShards[i]:SetPoint("TOPLEFT", self.SoulShards, "TOPLEFT", 0, -1)
else
self.SoulShards[i]:SetPoint("TOPLEFT", self.SoulShards[i-1], "TOPRIGHT", 1, 0)
end
-- so we have a bar when it's depleted
self.SoulShards[i].bg = self.SoulShards:CreateTexture(nil, "BACKGROUND")
self.SoulShards[i].bg:SetAllPoints(self.SoulShards[i])
self.SoulShards[i].bg:SetTexture(texture)
self.SoulShards[i].bg.multiplier = .4
end
self.SoulShards:SetBackdrop{
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
insets = {left = -2, right = -2, top = 0, bottom = -2},
}
self.SoulShards:SetBackdropColor(0, 0, 0, .8)
end
end,
Originally Posted by haste
I'm hopefully not the only one thinking this.. but your layout is one big incorrectly indented if-hell.
For anyone who dares to look into it, here is a version of the code above which I ran through vim.
|
Thank you for running it through vim (ps.. gotta love vim huh :P On Win I use Notepad++ though for the tabbed interface)
But no, Haste, you're not the only one. That said, not everyone is an amazing whiz like you are when it comes to programming, I sure ain't. Heck, I would give a lot to even come remotely close :P
Originally Posted by Monolit
On a side note: why do you still use oUF_RuneBar for runes? It's been ages since haste implemented this into oUF core.
|
Maybe he prefers the way he can use it? Though I've noticed little difference when I swapped from oUF_Runebar to the built-in.