Thread Tools Display Modes
Prev Previous Post   Next Post Next
09-01-12, 02:48 AM   #1
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 331
DurabilityFrame SetPoint Hook to reparent

So, previous in 4.3 I was using a simple hooksecurefunc to "SetPoint" for the DurabilityFrame to allow me to set a custom point for the frame.

For some reason unknown to me this method no longer works and there has been 0 changes to the durability frame.

My Code:
Lua Code:
  1. local function UpdatePoint()
  2.     DurabilityFrame:ClearAllPoints()
  3.     DurabilityFrame:SetPoint("TOPRIGHT",Minimap,"BOTTOMLEFT",-20,-20)
  4. end
  5.  
  6. hooksecurefunc(DurabilityFrame,"SetPoint",function(self,_,parent)
  7.     if (parent == "MinimapCluster") or (parent == _G["MinimapCluster"]) then
  8.         UpdatePoint()
  9.     end
  10. end)
  11.  
  12. tinsert(TUSUI.Updaters, UpdatePoint)

Can anyone point me as to what is preventing me from updating the point correctly?

Edit: Just to make this clear, the function UpdatePoint() is getting called and my global table insert is just to make sure it gets called again after my addon is loaded.

Last edited by suicidalkatt : 09-02-12 at 04:54 AM.
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Old method of frame placement no longer working.


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off