Quantcast WoWInterface - View Single Post - oUF_Layout optimization
View Single Post
12-13-14, 02:57 AM   #10
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by sirann View Post
so inside of my shared function put:

oUF:RegisterStyle('oUF_Terenna_Player', UnitSpecific.player)
as well as other units with the UnitSpecific.insertunitnamehere ?
No, that won't do anything there; you need to actually call the function:

Code:
local func = UnitSpecific[unit]
if func then
   func()
end
Also, that would need to be at the end of the function, so all the objects are created before the unit specific function tries to do stuff with them.

Originally Posted by sirann View Post
And then just have oUF:SetActiveStyle('oUF_Terenna') at the bottom of my code outside of all functions?
Yes.
__________________
Author/maintainer of Grid, PhanxChat, oUF_Phanx, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
  Reply With Quote