Delay spawning with the new factory
Adrian L Lange [05-14-10 - 00:29]
Delay spawning with the new factory
diff --git a/oUF_P3lim.lua b/oUF_P3lim.lua
index 5ed7d3d..4f669b4 100644
--- a/oUF_P3lim.lua
+++ b/oUF_P3lim.lua
@@ -284,10 +284,11 @@ local function Style(self, unit)
end
oUF:RegisterStyle('P3lim', Style)
-oUF:SetActiveStyle('P3lim')
-
-oUF:Spawn('player'):SetPoint('CENTER', -220, -250)
-oUF:Spawn('pet'):SetPoint('CENTER', -410, -250)
-oUF:Spawn('focus'):SetPoint('CENTER', -255, -225)
-oUF:Spawn('target'):SetPoint('CENTER', 220, -250)
-oUF:Spawn('targettarget'):SetPoint('CENTER', 254, -225)
+oUF:Factory(function(self)
+ self:SetActiveStyle('P3lim')
+ self:Spawn('player'):SetPoint('CENTER', -220, -250)
+ self:Spawn('pet'):SetPoint('CENTER', -410, -250)
+ self:Spawn('focus'):SetPoint('CENTER', -255, -225)
+ self:Spawn('target'):SetPoint('CENTER', 220, -250)
+ self:Spawn('targettarget'):SetPoint('CENTER', 254, -225)
+end)