<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>WidgetWarlock/ArtSummons.lua</filename>
    </added>
    <added>
      <filename>WidgetWarlock/FadeIn.lua</filename>
    </added>
    <added>
      <filename>WidgetWarlock/LibStub.lua</filename>
    </added>
    <added>
      <filename>WidgetWarlock/Summons.lua</filename>
    </added>
    <added>
      <filename>WidgetWarlock/TextureTables.lua</filename>
    </added>
    <added>
      <filename>WidgetWarlock/Tooltips.lua</filename>
    </added>
    <added>
      <filename>WidgetWarlock/WidgetWarlock.xml</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -5,8 +5,7 @@ if not ControlFreak then return end
 
 
 local DongleFrames = DongleStub(&quot;DongleFrames-1.0&quot;)
-local ww = WidgetWarlock
-WidgetWarlock = nil
+local ww = LibStub(&quot;WidgetWarlock-Alpha1&quot;)
 local ControlFreak = ControlFreak
 
 
@@ -25,52 +24,24 @@ function ControlFreak:CreatePanel()
 	frame:SetScript(&quot;OnHide&quot;, function() self:UnregisterEvent(&quot;PLAYER_REGEN_DISABLED&quot;) end)
 
 
-	local lockpos, lockposlabel = ww.SummonLabeledCheckBox(&quot;Lock frame&quot;, 22, frame, &quot;TOPLEFT&quot;, 15, -10)
-	ww.EnslaveTooltip(lockpos, &quot;Locks the frame to prevent accidental movement&quot;)
+	local lockpos = ww:SummonCheckBox(frame, nil, &quot;TOPLEFT&quot;, 15, -10)
+	ww:EnslaveLabel(lockpos, &quot;Lock frame&quot;)
+	lockpos:SetHitRectInsets(0, -100, 0, 0)
+	ww:EnslaveTooltip(lockpos, &quot;Locks the frame to prevent accidental movement&quot;)
 	lockpos:SetScript(&quot;OnClick&quot;, function() self.db.profile.frameopts.locked = not self.db.profile.frameopts.locked end)
 	lockpos:SetChecked(self.db.profile.frameopts.locked)
 
 
-	local showtip = ww.SummonLabeledCheckBox(&quot;Show tooltip&quot;, 22, frame, &quot;TOPLEFT&quot;, lockpos, &quot;TOPLEFT&quot;, 133, 0)
-	ww.EnslaveTooltip(showtip, &quot;Show help tooltip on hover&quot;)
+	local showtip = ww:SummonCheckBox(frame, nil, &quot;TOPLEFT&quot;, lockpos, &quot;TOPLEFT&quot;, 133, 0)
+	showtip:SetHitRectInsets(0, -100, 0, 0)
+	ww:EnslaveLabel(showtip, &quot;Show tooltip&quot;)
+	ww:EnslaveTooltip(showtip, &quot;Show help tooltip on hover&quot;)
 	showtip:SetScript(&quot;OnClick&quot;, function() self.db.profile.showtooltip = not self.db.profile.showtooltip end)
 	showtip:SetChecked(self.db.profile.showtooltip)
 
 
-	local editbox = CreateFrame(&quot;EditBox&quot;, nil, frame)
-	editbox:SetWidth(620) editbox:SetHeight(200)
-	editbox:SetPoint(&quot;BOTTOMLEFT&quot;, 5, 5)
-	editbox:SetFontObject(GameFontHighlight)
-	editbox:SetTextInsets(8,8,8,8)
-	editbox:SetBackdrop(ww.TooltipBorderBG)
-	editbox:SetBackdropColor(.1,.1,.1,.3)
-	editbox:SetMultiLine(true)
-	editbox:SetAutoFocus(false)
-	editbox:SetText(self.db.profile.macrotext or &quot;/script ChatFrame1:AddMessage(\&quot;Error loading macro!\&quot;)&quot;)
-	editbox:SetScript(&quot;OnTextChanged&quot;, function()
-		self.db.profile.macrotext = editbox:GetText()
-		self.macroupdated = true
-		if not InCombatLockdown() then self:PLAYER_REGEN_ENABLED() end
-	end)
-	editbox:SetScript(&quot;OnEscapePressed&quot;, function(self) self:ClearFocus() end)
-	local macrolabel = ww.EnslaveLabel(editbox, &quot;Macro&quot;, &quot;BOTTOMLEFT&quot;, editbox, &quot;TOPLEFT&quot;, 5, 0)
-	self.combatwarn = ww.EnslaveLabel(editbox, &quot;|cffff0000Macro changes will not apply until combat ends!&quot;, &quot;BOTTOMRIGHT&quot;, editbox, &quot;TOPRIGHT&quot;, -5, 0)
-
-	local debuff = CreateFrame(&quot;EditBox&quot;, nil, frame)
-	debuff:SetPoint(&quot;BOTTOMRIGHT&quot;, editbox, &quot;TOPRIGHT&quot;, 0, 15) debuff:SetWidth(200) debuff:SetHeight(22)
-	debuff:SetFontObject(GameFontHighlight)
-	debuff:SetTextInsets(8,8,8,8)
-	debuff:SetBackdrop(ww.TooltipBorderBG)
-	debuff:SetBackdropColor(.1,.1,.1,.3)
-	debuff:SetAutoFocus(false)
-	debuff:SetText(self.db.profile.spellname)
-	debuff:SetScript(&quot;OnTextChanged&quot;, function() self.db.profile.spellname = debuff:GetText() end)
-	debuff:SetScript(&quot;OnEscapePressed&quot;, function(self) self:ClearFocus() end)
-	ww.EnslaveLabel(debuff, &quot;Debuff&quot;, &quot;RIGHT&quot;, debuff, &quot;LEFT&quot;, -5, 0)
-
-
-	local threshslider, threshslidertext = ww.SummonSlider(frame, &quot;Break Threshold: &quot;..self.db.profile.breakthreshold..&quot; sec&quot;, 0, 10, &quot;TOPLEFT&quot;, lockpos, &quot;BOTTOMLEFT&quot;, -5, -15)
-	ww.EnslaveTooltip(threshslider, &quot;Time (in seconds) before spell breaks to unfade frame.&quot;)
+	local threshslider, threshslidertext = ww:SummonSlider(frame, &quot;Break Threshold: &quot;..self.db.profile.breakthreshold..&quot; sec&quot;, 0, 10, &quot;TOPLEFT&quot;, lockpos, &quot;BOTTOMLEFT&quot;, -5, -15)
+	ww:EnslaveTooltip(threshslider, &quot;Time (in seconds) before spell breaks to unfade frame.&quot;)
 	threshslider:SetValue(self.db.profile.breakthreshold)
 	threshslider:SetValueStep(1)
 	threshslider:SetScript(&quot;OnValueChanged&quot;, function()
@@ -80,8 +51,8 @@ function ControlFreak:CreatePanel()
 
 
 	local alpha = math.floor(self.db.profile.alpha*100 + .5)
-	local alphaslider, alphaslidertext = ww.SummonSlider(frame, &quot;Alpha: &quot;..alpha..&quot;%&quot;, &quot;0%&quot;, &quot;100%&quot;, &quot;LEFT&quot;, threshslider, &quot;RIGHT&quot;, 10, 0)
-	ww.EnslaveTooltip(alphaslider, &quot;Alpha level to fade frame to when focus is controlled, dead, or not set.&quot;)
+	local alphaslider, alphaslidertext = ww:SummonSlider(frame, &quot;Alpha: &quot;..alpha..&quot;%&quot;, &quot;0%&quot;, &quot;100%&quot;, &quot;LEFT&quot;, threshslider, &quot;RIGHT&quot;, 10, 0)
+	ww:EnslaveTooltip(alphaslider, &quot;Alpha level to fade frame to when focus is controlled, dead, or not set.&quot;)
 	alphaslider:SetValue(self.db.profile.alpha)
 	alphaslider:SetValueStep(0.05)
 	alphaslider:SetScript(&quot;OnValueChanged&quot;, function()
@@ -92,6 +63,34 @@ function ControlFreak:CreatePanel()
 	end)
 
 
+	local debuff = ww:SummonEditBox(frame, 200, &quot;BOTTOMLEFT&quot;, threshslider, &quot;TOPLEFT&quot;, 5, -55)
+	debuff:SetText(self.db.profile.spellname)
+	debuff:SetScript(&quot;OnTextChanged&quot;, function() self.db.profile.spellname = debuff:GetText() end)
+	debuff:SetScript(&quot;OnEscapePressed&quot;, function(self) self:ClearFocus() end)
+	ww:EnslaveLabel(debuff, &quot;Debuff&quot;)
+
+
+	local editbox = CreateFrame(&quot;EditBox&quot;, nil, frame)
+	editbox:SetWidth(620)
+	editbox:SetPoint(&quot;BOTTOMLEFT&quot;, 5, 5)
+	editbox:SetPoint(&quot;TOP&quot;, frame, &quot;BOTTOM&quot;, 0, 170)
+	editbox:SetFontObject(GameFontHighlight)
+	editbox:SetTextInsets(8,8,8,8)
+	editbox:SetBackdrop(ww.TooltipBorderBG)
+	editbox:SetBackdropColor(.1,.1,.1,.3)
+	editbox:SetMultiLine(true)
+	editbox:SetAutoFocus(false)
+	editbox:SetText(self.db.profile.macrotext or &quot;/script ChatFrame1:AddMessage(\&quot;Error loading macro!\&quot;)&quot;)
+	editbox:SetScript(&quot;OnTextChanged&quot;, function()
+		self.db.profile.macrotext = editbox:GetText()
+		self.macroupdated = true
+		if not InCombatLockdown() then self:PLAYER_REGEN_ENABLED() end
+	end)
+	editbox:SetScript(&quot;OnEscapePressed&quot;, function(self) self:ClearFocus() end)
+	local macrolabel = ww:EnslaveLabel(editbox, &quot;Macro&quot;, &quot;BOTTOMLEFT&quot;, editbox, &quot;TOPLEFT&quot;, 5, 0)
+	self.combatwarn = ww:EnslaveLabel(editbox, &quot;|cffff0000Macro changes will not apply until combat ends!&quot;, &quot;BOTTOMRIGHT&quot;, editbox, &quot;TOPRIGHT&quot;, -5, 0)
+
+
 	local resetmacro = CreateFrame(&quot;Button&quot;, name..&quot;ResetMacro&quot;, frame, &quot;UIPanelButtonGrayTemplate&quot;)
 	resetmacro:SetPoint(&quot;TOPRIGHT&quot;, -5, -5) resetmacro:SetWidth(120) resetmacro:SetHeight(22)
 	resetmacro:SetText(&quot;Reset Defaults&quot;)</diff>
      <filename>Config.lua</filename>
    </modified>
    <modified>
      <diff>@@ -27,6 +27,7 @@ local L = {
 local LegoBlock = DongleStub(&quot;LegoBlock-Beta0&quot;)
 local OptionHouse = DongleStub(&quot;OptionHouse-1.0&quot;)
 ControlFreak = DongleStub(&quot;Dongle-1.0&quot;):New(&quot;ControlFreak&quot;)
+if tekDebug then ControlFreak:EnableDebug(1, tekDebug:GetFrame(&quot;ControlFreak&quot;)) end
 
 
 function ControlFreak:Initialize()
@@ -141,12 +142,19 @@ end
 
 function ControlFreak:PLAYER_FOCUS_CHANGED()
 	focusexists = UnitExists(&quot;focus&quot;)
+	self:Debug(1, &quot;PLAYER_FOCUS_CHANGED&quot;, focusexists)
 	focusisenemy = focusexists and UnitIsEnemy(&quot;player&quot;, &quot;focus&quot;)
 	focusdead = focusexists and UnitIsDead(&quot;focus&quot;)
 	isvalid.focus = targtypes[UnitCreatureType(&quot;focus&quot;)]
 
 	lasthp, lasthptime = focusexists and UnitHealth(&quot;focus&quot;), 0
 
+	if focusexists then self:UNIT_AURA(&quot;UNIT_AURA&quot;, &quot;focus&quot;)
+	else
+		controlled.focus = nil
+		self:OnUpdate(true)
+	end
+
 	if (not focusexists and not targetexists)
 		or focusdead and not targetexists
 		or targetdead and not focusexists
@@ -159,10 +167,12 @@ end
 function ControlFreak:UNIT_AURA(event, unit)
  	if unit ~= &quot;focus&quot; then return end
 
+	self:Debug(1, &quot;UNIT_AURA&quot;, controlled[unit])
 	local wascontrolled = (controlled[unit] ~= nil)
 	controlled[unit] = nil
 	for i=1,maxdebuffs do
-		if UnitDebuff(unit, i) == spellname then controlled[unit] = i end
+		self:Debug(1, UnitDebuff(unit, i))
+		if UnitDebuff(unit, i) == self.db.profile.spellname then controlled[unit] = i end
 	end
 
 	if wascontrolled ~= (controlled[unit]~= nil) then self:OnUpdate(true) end
@@ -189,7 +199,7 @@ function ControlFreak:OnUpdate(elapsed)
 	if unit then
 		if not isvalid[unit] then color, note, tiptext = &quot;grey&quot;, &quot;Invalid&quot;
 		else
-			if IsSpellInRange(spellname, unit) == 0 then range = &quot;*&quot; end
+			if IsSpellInRange(self.db.profile.spellname, unit) == 0 then range = &quot;*&quot; end
 			if lasthptime and lasthptime &gt;= (GetTime()-damageinterval) then alpha, color, note = 1.0, &quot;red&quot;, &quot;Damage&quot;
 			elseif controlled[unit] then
 				local _, _, _, _, _, _, timeLeft = UnitDebuff(unit, controlled[unit])</diff>
      <filename>ControlFreak.lua</filename>
    </modified>
    <modified>
      <diff>@@ -12,11 +12,15 @@
 
 ## OptionalDeps: Dongle, OptionHouse
 
+## LoadManagers: AddonLoader
+## X-LoadOn-NotResting: true
+## X-LoadOn-Slash: /freak
+
 Dongle.lua
 OptionHouse.lua
 DongleFrames.lua
 LegoBlock.lua
-WidgetWarlock.lua
+WidgetWarlock\WidgetWarlock.xml
 
 ClassMacrotexts.lua
 ControlFreak.lua</diff>
      <filename>ControlFreak.toc</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>WidgetWarlock.lua</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>349ecc5309e1eaa83e2345d153e8914dd61dcc3e</id>
    </parent>
  </parents>
  <author>
    <name>Tekkub Stoutwrithe</name>
    <email>tekkub@gmail.com</email>
  </author>
  <url>http://github.com/tekkub/controlfreak/commit/e9599786fb788a3f442e028de3cfffcba6593713</url>
  <id>e9599786fb788a3f442e028de3cfffcba6593713</id>
  <committed-date>2007-09-14T02:10:10-07:00</committed-date>
  <authored-date>2007-09-14T02:10:10-07:00</authored-date>
  <message>ControlFreak
- Addon loader support!
- Added new WidgetWarlock
- Some debug bits
- Hopefully fixed issues with &quot;controlled&quot; detection, specifically when the focus is set AFTER the unit is controlled.
- Fixed debuff name setting not actually getting used

git-svn-id: http://tekkub-wow.googlecode.com/svn/trunk/ControlFreak@530 86fe6d9a-1522-0410-a387-bf9db416f0a0</message>
  <tree>8d7324a244d61724c7e84d53c76ab5a18d222e43</tree>
  <committer>
    <name>Tekkub Stoutwrithe</name>
    <email>tekkub@gmail.com</email>
  </committer>
</commit>
