Download
(4Kb)
Download
Updated: 12-09-09 08:05 AM
Pictures
File Info
Updated:12-09-09 08:05 AM
Created:08-14-09 07:31 AM
Downloads:22,776
Favorites:85
MD5:

oUF MoveableFrames  Popular! (More than 5000 hits)

Version: 1.6
by: Xruptor [More]

THIS ADDON IS OUTDATED! IT HAS BEEN ABANDONED! I DON'T PLAN TO UPDATE IT!

THIS MOD IS NO LONGER MAINTAINED. I HAVE ONLY KEPT IT IN CASE YOUR USING A REALLY OLD OUF LAYOUT! OTHERWISE USE THE MOD BELOW INSTEAD TO MOVE YOUR FRAMES! IT'S THE OFFICIAL ONE FROM HASTE!

oUF_MovableFrames





------------------------------------------------------------------------

BTW: Yes I know it's spelled 'movable' and not 'moveable', but you'd be surprised how many people forget that. I also wanted this library to show in searches when the word 'move' was used. :P

Since so many oUF layouts have frames that cannot be moved or repositioned. I created this plugin to allow users to move frames without having to have any programming experience.

NOTE: This plugin requires that the oUF layout author add support for this plugin in their oUF layout. If support is not added then this plugin will not work.

Usage: Type /mvf to toggle the unlocking and locking of frames.

Header frames will have a small movable red square that can be positioned anywhere on the screen. You may or may not be able to see the frames attached to this anchor.


----------------------------
Authors:

NOTE: Authors you MUST make sure your frames and objects are created with NAMES. If no names are provided then the library will return errors. The library cannot possibly know how to save/restore a frame or object with no name.

To implement this plugin in your layout, simply add the code below in the style creation (frame creation) phase of your addon.

Code:
self.MoveableFrames = true

OPTIONAL:
You can also use the new BlackList and WhiteList functions added in version 1.3:

Code:
oUF_MoveableFrames_BLKLST(framename)

OPTIONAL:
Blacklisted frames will not be able to be moved or repositioned by the user. So if you have a specific frame you want not to be moved, then use this function.

Code:
oUF_MoveableFrames_WHTLST(framename)

OPTIONAL:
Whitelisted frames will be able to be moved and repositioned by the user. This function can be used for frames outside of the oUF object set. So if you have custom frames you wish to be added to the moveableframes library, you can use this function to do so.


-----------------------
HEADER FRAME SUPPORT:
-----------------------


Header frames are now supported in this library. The 'oUF_MoveableFrames_HEADER' function will automatically create an anchor frame that can be moved by the user. This anchor will be stored and repositioned each time the user logs into the game. There is no special setup required. All frames that are passed to this function will have it's SetPoint set to the anchor.

Code:
oUF_MoveableFrames_HEADER(frame, desc, ofsx, ofsy)
NOTE: In order to see the anchors on the screen, the users must use the slash command /mvf. The anchor frames are hidden by default.

Version 1.6:
-Updated toc

Version 1.5:
-Removed some redundant code
-Some code cleanup

Version 1.4:
NOTE: Frames must now be moved using the unlock/lock toggle. Type /mvf to toggle.
-Removed some redundant code
-Removed the ability to drag frames using the ALT key.
-Added a lock/unlock toggle for moving frames. (Alt Key drag has been removed)

Version 1.3:
-Added two new functions to allow authors to add frames to a WhiteList or BlackList.
-Added function oUF_MoveableFrames_BLKLST, allows an author to add a frame to a list of frames that cannot be moved or repositioned.
-Added function oUF_MoveableFrames_WHTLST, allows an author to add a frame to a list of frames that can be moved and repositioned.

-Added Header Frame Support!
--Added function oUF_MoveableFrames_HEADER, allows an author to designate a header frame he/she wants to be moved and repositioned. This function will automatically create a movable anchor frame that will have it's positioned stored and then restored. The parent frame will have it's position automatically set to the anchor. There is no special setup required.

-Added a slash command, /mvf to display and hide all the header frame anchors on the screen.


Version 1.2:
-Added several nil checks
-Added a warning display for frames/objects with no names to reposition.
-Added a note to oUF style authors to please add names to their frames/objects.

Version 1.1:
-Fixed placement issues and position bugs that were occurring for some users. (Special thanks to Dawn)
Optional Files (0)


Post A Reply Comment Options
Unread 08-20-09, 05:18 AM  
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view AddOns

Forum posts: 918
File comments: 959
Uploads: 22
Mhm, I can't find a proper way to spawn party frames that don't reset to their original position "onupdate" aka reload ui or joining/leaving members. How do you spawn your party?

E: That's how I do it, pretty much mainstream...
Code:
local party = oUF:Spawn("header", "oUF_Party")
party:SetManyAttributes("showParty", true, "yOffset", 90, "point", "BOTTOM")
party:SetPoint("BOTTOM", UIParent, "BOTTOM", -560, 400)
party:Show()
oUF_Party:SetScale(ScaleParty)
Last edited by Dawn : 08-20-09 at 05:19 AM.
Report comment to moderator  
Reply With Quote
Unread 08-19-09, 11:58 PM  
WIuser
A Murloc Raider
 
WIuser's Avatar
AddOn Author - Click to view AddOns

Forum posts: 8
File comments: 7
Uploads: 1
Re: Re: Re: header frames

Originally posted by Derkyle
Yep this is how I would do it. You need the make the first MT the priority then attach the rest of the frames as parents to the first MT frame. That way when you move any of the child MT windows the parent and the rest will drag with it.

If you still have issues or you can't get it to work either way let me know by replying.
how would one go about said functionality ( maybe an example ). I get the idea, but im still very new to lua. Anyone got a link that deals with this type of thing?
Report comment to moderator  
Reply With Quote
Unread 08-19-09, 06:47 AM  
Phetus
A Kobold Labourer

Forum posts: 0
File comments: 9
Uploads: 1
Awesome I've not been able to update my fromes as I can't be assed to change the lua file every time

I think I love you!!
Report comment to moderator  
Reply With Quote
Unread 08-18-09, 06:59 AM  
Xruptor
A Flamescale Wyrmkin
 
Xruptor's Avatar
AddOn Author - Click to view AddOns

Forum posts: 137
File comments: 640
Uploads: 22
Re: Re: header frames

Originally posted by Dawn
If you spawn the first MT and parent all others to it, you should be able to move the first MT and the others will follow. At least this is how it works for me (not tested for MT targets in paticular, but for example party 2,3,4 parented to 1 or ToT parented to target).
Yep this is how I would do it. You need the make the first MT the priority then attach the rest of the frames as parents to the first MT frame. That way when you move any of the child MT windows the parent and the rest will drag with it.

If you still have issues or you can't get it to work either way let me know by replying.
__________________
Click HERE for the ultimate idiot test.

if (sizeof(sadness) > sizeof(happiness)) { initDepression(); }
Report comment to moderator  
Reply With Quote
Unread 08-18-09, 06:56 AM  
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view AddOns

Forum posts: 918
File comments: 959
Uploads: 22
Re: header frames

Originally posted by WIuser
nice addon, great concept

i been trialing it with my Main tank list, but im finding it makes each individual tank movable. These are created through the spawn header function.

Any suggestions?
If you spawn the first MT and parent all others to it, you should be able to move the first MT and the others will follow. At least this is how it works for me (not tested for MT targets in paticular, but for example party 2,3,4 parented to 1 or ToT parented to target).
Report comment to moderator  
Reply With Quote
Unread 08-18-09, 03:38 AM  
WIuser
A Murloc Raider
 
WIuser's Avatar
AddOn Author - Click to view AddOns

Forum posts: 8
File comments: 7
Uploads: 1
header frames

nice addon, great concept

i been trialing it with my Main tank list, but im finding it makes each individual tank movable. These are created through the spawn header function.

Any suggestions?
Report comment to moderator  
Reply With Quote
Unread 08-17-09, 12:08 PM  
Jansus
A Fallenroot Satyr
AddOn Author - Click to view AddOns

Forum posts: 28
File comments: 73
Uploads: 1
Originally posted by Derkyle
The oUF layout you are using may be forcing the position to reset. My suggestion is to put the code at the end of all the frame creation sequence. That way the plugin has priority after the layout has reset the positions.
Thanks, I'll give that a try
Report comment to moderator  
Reply With Quote
Unread 08-17-09, 07:22 AM  
Xruptor
A Flamescale Wyrmkin
 
Xruptor's Avatar
AddOn Author - Click to view AddOns

Forum posts: 137
File comments: 640
Uploads: 22
Originally posted by Jansus
I've managed to get this working with the layout I use, but I noticed it doesn't save the position, could I of added the code to the wrong area? I just did a search for self.Health, and added the line just above it. It works, just doesn't save position.
The oUF layout you are using may be forcing the position to reset. My suggestion is to put the code at the end of all the frame creation sequence. That way the plugin has priority after the layout has reset the positions.
__________________
Click HERE for the ultimate idiot test.

if (sizeof(sadness) > sizeof(happiness)) { initDepression(); }
Report comment to moderator  
Reply With Quote
Unread 08-16-09, 09:57 PM  
Jansus
A Fallenroot Satyr
AddOn Author - Click to view AddOns

Forum posts: 28
File comments: 73
Uploads: 1
I've managed to get this working with the layout I use, but I noticed it doesn't save the position, could I of added the code to the wrong area? I just did a search for self.Health, and added the line just above it. It works, just doesn't save position.
Report comment to moderator  
Reply With Quote
Unread 08-16-09, 09:31 PM  
Xruptor
A Flamescale Wyrmkin
 
Xruptor's Avatar
AddOn Author - Click to view AddOns

Forum posts: 137
File comments: 640
Uploads: 22
Originally posted by tukz
it is possible to add a command to reset back X, Y positions to oUF layout default? some people don't know how to reset it back to default by deleting value in layout-local.txt.

thank for this mod!
That would technically require me to add a slash command to delete the frame entries from the database, or reset the layout position. This plugin was created to be very simple.

They could just simply drag the frames to their original position. They cannot drag the frames off the screen as they are clamped to the screen. So there would be no reason to add a reset other then to have the layout install as if it were fresh.

I will look into it, but I cannot promise you that I will add it
__________________
Click HERE for the ultimate idiot test.

if (sizeof(sadness) > sizeof(happiness)) { initDepression(); }
Report comment to moderator  
Reply With Quote
Unread 08-16-09, 05:14 PM  
tukz
A Fallenroot Satyr
 
tukz's Avatar
AddOn Author - Click to view AddOns

Forum posts: 20
File comments: 50
Uploads: 3
it is possible to add a command to reset back X, Y positions to oUF layout default? some people don't know how to reset it back to default by deleting value in layout-local.txt.

thank for this mod!
Last edited by tukz : 08-16-09 at 05:15 PM.
Report comment to moderator  
Reply With Quote
Unread 08-15-09, 08:20 AM  
Xruptor
A Flamescale Wyrmkin
 
Xruptor's Avatar
AddOn Author - Click to view AddOns

Forum posts: 137
File comments: 640
Uploads: 22
With the help of Dawn I have corrected the placement issues that may occur. I will be uploading the latest version to correct these issues.

Special thanks to Dawn


So when you see version 1.1 up, that would be the latest version.
__________________
Click HERE for the ultimate idiot test.

if (sizeof(sadness) > sizeof(happiness)) { initDepression(); }
Last edited by Xruptor : 08-15-09 at 08:21 AM.
Report comment to moderator  
Reply With Quote
Unread 08-15-09, 05:57 AM  
tukz
A Fallenroot Satyr
 
tukz's Avatar
AddOn Author - Click to view AddOns

Forum posts: 20
File comments: 50
Uploads: 3
very nice plugin, this will save me a lot of time from users question for my oUF Layout.

thank's so much!
Report comment to moderator  
Reply With Quote
Unread 08-14-09, 12:31 PM  
Rhaethe
A Warpwood Thunder Caller
 
Rhaethe's Avatar

Forum posts: 98
File comments: 35
Uploads: 0
This plugin makes me a very very happy camper.

Happy dance happy dance
Report comment to moderator  
Reply With Quote
Unread 08-14-09, 12:11 PM  
Xruptor
A Flamescale Wyrmkin
 
Xruptor's Avatar
AddOn Author - Click to view AddOns

Forum posts: 137
File comments: 640
Uploads: 22
Will work with you in PM's to sort the issue out We'll fix this!
__________________
Click HERE for the ultimate idiot test.

if (sizeof(sadness) > sizeof(happiness)) { initDepression(); }
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: