Thread Tools Display Modes
04-03-12, 06:14 PM   #1
Fox536
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Apr 2012
Posts: 31
Moving the DurabilityFrame?

Does anyone know how to move the frame through lua. I've tried the normal steps. something is either moving it back automatically or stopping me from moving it.

Things I've tried,
ClearAllPoints, then SetPoint
Secure Hooking the UIParent_ManageFramePositions
a Dirty Post hook on UIParent_ManageFramePositions
ect.


Nothing seems to make it move, Im really at a lost for how it can refuse to move. Any help on this would be great.
  Reply With Quote
04-03-12, 06:40 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Unless we see the exact code you've tried to move it, we can only guess.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
04-03-12, 07:14 PM   #3
Fox536
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Apr 2012
Posts: 31
lol, like i said the standard stuff to move a frame, just the Durability Frame is different some how. I also tried with all addons disabled except for WoWLua.

But here are some examples:

Lua Code:
  1. -- Trying the normal method
  2. DurabilityFrame:ClearAllPoints();
  3. DurabilityFrame:SetPoint("CENTER", 0, 0);

Lua Code:
  1. -- Trying to update the Position
  2. DurabilityFrame:ClearAllPoints();
  3. DurabilityFrame:SetPoint("CENTER", 0, 0);
  4. DurabilityFrame:Hide();
  5. DurabilityFrame:Show();


Lua Code:
  1. -- Trying to prevent other functions from using the SetPoint method
  2. DurabilityFrame:ClearAllPoints();
  3. DurabilityFrame:SetPoint("CENTER", 0, 0);
  4. FoxTest = FoxTest or DurabilityFrame.SetPoint;
  5. DurabilityFrame.SetPoint = nil;

Lua Code:
  1. -- Trying to prevent other functions from even reaching the DurabilityFrame
  2. FoxTest = DurabilityFrame;
  3. DurabilityFrame = nil;
  4. FoxTest:ClearAllPoints();
  5. FoxTest:SetPoint("CENTER", 0, 0);
  6. FoxTest.SetPointOld = FoxTest.SetPointOld or FoxTest.SetPoint;
  7. FoxTest.SetPoint = nil;

And the list goes on, I mixed and matched for over 3 hours last night trying to get anything to make the changes stick. But from what I could tell, no matter what I tried something in the default UI kept moving it back instantly. I really don't know what it is doing it, but it's pretty frustrating. Without completely writing a new Durability Frame, I don't know anything else to try, but I'm all ears if anyone has a suggestion.
  Reply With Quote
04-03-12, 09:20 PM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
I don't have time to look into it and give you the exact code, but the addon SmoothDurability is able to move the durability frame and keep it in its new location. It's not a very big addon, so you should be able to find the relevant code fairly quickly.
  Reply With Quote
04-03-12, 09:22 PM   #5
Fox536
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Apr 2012
Posts: 31
Ok, I'll look into that addon, cause the Blizzard frame doesn't seem to show any ideas what's happening to it lol.

[Edit]Thanks so much, I got it to work, using what I gleamed from Smooth Durability. It really is a great addon, I'll probably use it in the future, but I needed to make my addon where it'd function without it if the user so chooses lol. Thanks again for all the help, 2 days of solid frustration and you solved it in like 2 mins. Lol straight awesomeness.

Last edited by Fox536 : 04-03-12 at 09:56 PM.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Moving the DurabilityFrame?


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