Reply
Thread Tools Display Modes
Unread 08-30-12, 12:56 PM   #1
Basso
A Deviate Faerie Dragon
 
Basso's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 15
How can i move DurabilityFrame and others things?

All the things wich are usually attached to the minimap cluster, im trying to move them and im really fustrated now....

Lua Code:
  1. DurabilityFrame:Hide()
  2. DurabilityFrame:Alpha(0)
  3. DurabilityFrame:SetOwner(WorldFrame, "ANCHOR_NONE")
  4. DurabilityFrame:SetPoint("CENTER", 0, 0)
  5. VehicleSeatIndicator:SetPoint("TOP", UIParent, "TOP", 0, 350)

tried everthing but nothing works, the only thing i was able to to move them up and down nothing more.

what do i need to do to move them like all the other frames, i looked in some other addons to get an idea but i didnt found a clue why i cant move them, i mean i cant even hide it....

i simply want to set the position of these things in a lua file, can anybody help me ?
Basso is offline   Reply With Quote
Unread 08-30-12, 01:13 PM   #2
Haleth
This Space For Rent
 
Haleth's Avatar
WoWInterface Super Mod
Featured
Join Date: Sep 2008
Posts: 1,168
You might be able to use this:

Code:
DurabilityFrame.ignoreFramePositionManager = true
Pretty much any frame on the right/top side of the screen is managed using the UIParent's frame position manager.
Haleth is offline   Reply With Quote
Unread 08-30-12, 01:32 PM   #3
Basso
A Deviate Faerie Dragon
 
Basso's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 15
tried to put it before or after the rest of the code nothing happens, i mean what the hell is that?
every other frame is easily moved.......

but thank you for your advice......
Basso is offline   Reply With Quote
Unread 08-30-12, 02:11 PM   #4
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 4,226
Look at Smooth Durability or other addons that move the durability frame to see how they bypass Blizzard's frame positioning.
__________________
Author/maintainer of Grid, PhanxChat, ShieldsUp, 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!
Phanx is offline   Reply With Quote
Unread 08-30-12, 02:43 PM   #5
Basso
A Deviate Faerie Dragon
 
Basso's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 15
sadly i dont understand what smooth durability is doing...

i understand how smooth durability makes it dragbale but i dont have a clue how he saves the position or how i would do it with a simple little permanent lua edit......

because of that im asking for advice from someone who understands it better......
Basso is offline   Reply With Quote
Unread 08-30-12, 03:00 PM   #6
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 9,581
Did you call :ClearAllPoints() to erase their previous locations?

Otherwise, you're just *adding* to how they're anchored.
__________________
"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

Seerah is offline   Reply With Quote
Unread 08-30-12, 03:19 PM   #7
Basso
A Deviate Faerie Dragon
 
Basso's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 15
Lua Code:
  1. DurabilityFrame:ClearAllPoints()
  2. DurabilityFrame.ignoreFramePositionManager = true
  3. DurabilityFrame:SetPoint("CENTER", UIParent, "CENTER", 0, 0)

I've tried many different things, no one of them works........

It seems to me that all the elements wich are usually anchored to the minimap cluster frame are something special, but since now i dont know what is special and how i can change it, i can anchor it to other frame and it sticks to this frame then, but i can move it only up an down not left not right.

the last solution would be creating an empty frame and sticking it to that frame but in my opinion there must be an easier way then creating 5-10 extra frames for each elemrnt i want to move.

Lua Code:
  1. local event = CreateFrame('Frame')
  2. local x = 0
  3. local y = 0
  4.  
  5. local move = function(self)
  6.     DurabilityFrame:ClearAllPoints()
  7.     DurabilityFrame:SetPoint("CENTER", UIParent, 'CENTER', x, y)
  8. end
  9.  
  10. event.PLAYER_LOGIN = function()
  11.     hooksecurefunc('UIParent_ManageFramePositions', move)
  12. end
  13.  
  14. event:SetScript("OnEvent", function(self, event, ...)
  15.     self[event](self, event, ...)
  16. end)
  17. event:RegisterEvent("PLAYER_LOGIN")

This one does work sometimes, but more often i doesnt work, for about 5 seconds then it moves back to it usual position....
got it out of some other post, even with the IgnoreFramePosition thing....

Last edited by Basso : 08-30-12 at 03:38 PM.
Basso is offline   Reply With Quote
Unread 08-30-12, 08:06 PM   #8
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 4,226
Look in the ClaimDurabilityFrame function in SmoothDurability. You also need to hook the frame's SetPoint method, at least.
__________________
Author/maintainer of Grid, PhanxChat, ShieldsUp, 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!
Phanx is offline   Reply With Quote
Reply

Go BackWoWInterface » Developer Discussions » General Authoring Discussion » How can i move DurabilityFrame and others things?

Thread Tools
Display Modes

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