12-03-12, 07:48 PM | #1 | ||
ClassIcon SetVertexColor issue
Hi,
I'm trying to update my layout to 1.6 and I encounter an issue from the ClassIcon element. Here's my code:
|
|||
12-04-12, 12:02 AM | #2 |
oUF expects each of your class icon objects to be a texture. If you aren't using any statusbar features (eg. displaying a value within a range) you should just make your objects textures instead of statusbars. They will look the same, but (a) not defy oUF's expectations and (b) use less memory.
Code:
--: CLASSICON :-- if cClassIcn == true then self.ClassIcons = CreateFrame("Frame", nil, self) self.ClassIcons:SetPoint("BOTTOMRIGHT", self.Health, "BOTTOMRIGHT", -3, 3) self.ClassIcons:SetHeight(10) self.ClassIcons:SetWidth(150) for i = 1, 5 do self.ClassIcons[i] = self:CreateTexture(nil, "ARTWORK") self.ClassIcons[i]:SetTexture(statusbar) self.ClassIcons[i]:SetHeight(10) self.ClassIcons[i]:SetWidth((150-4)/5) if i == 1 then self.ClassIcons[i]:SetPoint("BOTTOMRIGHT", self.Health, "TOPRIGHT", 0, 5) else self.ClassIcons[i]:SetPoint("RIGHT", self.ClassIcons[i-1], "LEFT", -1, 0) end end end Code:
local DoNothing = function() return end --: CLASSICON :-- if cClassIcn == true then self.ClassIcons = CreateFrame("Frame", nil, self) self.ClassIcons:SetPoint("BOTTOMRIGHT", self.Health, "BOTTOMRIGHT", -3, 3) self.ClassIcons:SetHeight(10) self.ClassIcons:SetWidth(150) for i = 1, 5 do self.ClassIcons[i] = CreateFrame("StatusBar", nil, self) self.ClassIcons[i].UpdateTexture = DoNothing ...
__________________
Retired author of too many addons. Message me if you're interested in taking over one of my addons. Don’t message me about addon bugs or programming questions. |
|
12-04-12, 06:39 AM | #3 |
Thanks alot it works perfectly !
And sorry about the QUOTE tags I'll use the right tags next time. |
|
WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » ClassIcon SetVertexColor issue |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|