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.
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.
self.MoveableFrames = true
OPTIONAL: You can also use the new BlackList and WhiteList functions added in version 1.3:
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.
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 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.
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.
-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)
-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.
-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.
-Fixed placement issues and position bugs that were occurring for some users. (Special thanks to Dawn)