ClassIcons
I know this question has been raised a lot lately but I've been trying to update my UI to late oUF and WoW API changes and I'm now trying to update to the new ClassIcons function of oUF.
I started with Monk and now Paladin but both are giving me the same problem. The bars get shown at like they were maxed but never disappear from the screen nor they are updated. I took my previous implementation of HolyPower and just changed the element to ClassIcons and I get the behavior I just described above. This is my code now for ClassIcons for the Paladin Holy Power: lua Code:
Dunno what is wrong since the element is not being updated. |
ClassIcons expects textures, not statusbars. You should turn Lua errors on, as it should error due to calling :SetVertexColor().
|
I'm a bit confused. I have Lua errors on and even BugSack and I get no errors whatsoever.
And I didn't quite get what you mean haste, since I'm not calling SetVertexColor anywhere. EDIT : Ok it's ClassIcons that call SetVertexColor... thing is It's not giving me any errors so I think somehow it's not linking to the oUF element at all. :/ I even check Phanx code on this topic and it also uses :SetStatusBarTexture for the Icons. EDIT 2 - I'm using print(self.Castbar) before delivering HolyPower to self.ClassIcons and it's returning a nil. I'm calling the function on the layout definition inside: Lua Code:
Does this means it's not linking ClassIcons correctly? |
Your HolyPower variable is local to the scope above where you assign ClassIcons. So your code basically reads "self.ClassIcons = nil".
Didn't notice the difference in scoping the first time around. |
Thanks. I didn't even noticed. I'm getting errors now, that is good I can now work with something. :)
|
Switch the statusbars to textures, unless you want to use them for something... statusbary. Alternatively just do HolyPower[i].SetStatusBarColor = SetStatusBarColor. (scumbag bbcodes interfering with code :P)
|
Thanks, it's working great now. :)
|
All times are GMT -6. The time now is 02:43 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI