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-14-09, 11:20 AM  
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view AddOns

Forum posts: 918
File comments: 959
Uploads: 22
It seems like this causes some issues with multiple characters. When I move the frames into position on one char it saves them just right. When I log into another char they are partly still in the default layout's position and/or just way off and/or partly where I moved them on the first char. It even happens that the mana bar is somewhere else in Y-coordinate. Possibly because it saves the frame height wrong. I checked the oUF_MoveableFrames.lua in savedvariables and it sometimes saves player height as 70+.

Besides, I would consider saving this per character to enhance it's utility. I still think that it's easier to change frame positions in the layout's lua once if you want to have them in a consistent position for all chars. Even with an option to move the frames in game.

Anyway, really nice addon. Will make life easier for a lot of users.

E: I implemented it for all units at once, if that might be an issue.

Code:
	if(unit) or (self:GetParent():GetName():match"oUF_Party") then 
		self.MoveableFrames = true
	end
Last edited by Dawn : 08-14-09 at 11:23 AM.
Report comment to moderator  
Reply With Quote
Unread 08-14-09, 11:27 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 Dawn
It seems like this causes some issues with multiple characters. When I move the frames into position on one char it saves them just right. When I log into another char they are partly still in the default layout's position and/or just way off and/or partly where I moved them on the first char. It even happens that the mana bar is somewhere else in Y-coordinate. Possibly because it saves the frame height wrong. I checked the oUF_MoveableFrames.lua in savedvariables and it sometimes saves player height as 70+.

Besides, I would consider saving this per character to enhance it's utility. I still think that it's easier to change frame positions in the layout's lua once if you want to have them in a consistent position for all chars. Even with an option to move the frames in game.

Anyway, really nice addon. Will make life easier for a lot of users.

E: I implemented it for all units at once, if that might be an issue.

Code:
	if(unit) or (self:GetParent():GetName():match"oUF_Party") then 
		self.MoveableFrames = true
	end
Remember the position is adjusted for player frame scale.

I will look into this a bit more. It should be saving them properly and restoring them. It works for me across several toons. However, I'm going to delete the saved data and see if I can repeat your issue. You may be right and saving the settings per character would be much more useful.
__________________
Click HERE for the ultimate idiot test.

if (sizeof(sadness) > sizeof(happiness)) { initDepression(); }
Last edited by Xruptor : 08-14-09 at 11:33 AM.
Report comment to moderator  
Reply With Quote
Unread 08-14-09, 11:37 AM  
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view AddOns

Forum posts: 918
File comments: 959
Uploads: 22
It might be because it saves to layout-local.txt (per character), too.

While it's:
Code:
Frame: oUF_Player
FrameLevel: 1
Anchor: BOTTOM
X: 13
Y: 137
W: 160
H: 24
Frame: oUF_Target
FrameLevel: 1
Anchor: CENTER
X: 12
Y: -174
W: 160
H: 24
on the first toon where I moved them first.

It's not saved on any other toon I log into. Which should result in loading the layouts defaults, but instead it seems to take the data from oUF_MoveableFrames.lua which results in a different position. And partly also in wrong anchors for whatever reason the ToT frame was no longer where it has to be, without even touching it directly (it get's moved along with oUF_Target since, it's anchored to it in my layout.)

Code:
oUF_MF = {
	["oUF_Target"] = {
		["Height"] = 24.00001293310891,
		["PosX"] = 553.0568543796901,
		["PosY"] = 238.0114418298147,
		["Width"] = 160.0000022492363,
	},
	["oUF_Player"] = {
		["Height"] = 24.00000168692725,
		["PosX"] = 554.417257254979,
		["PosY"] = 145.1198641592023,
		["Width"] = 160.0000562309083,
	},
}
I hope that helps.

E: I'm neither scaling any frames, nor do I use an UI scale.
Last edited by Dawn : 08-14-09 at 11:39 AM.
Report comment to moderator  
Reply With Quote
Unread 08-14-09, 11:45 AM  
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view AddOns

Forum posts: 918
File comments: 959
Uploads: 22
Some screens to explain it better

the first toon, where I moved them.


one of the others where I did nothing, but log in.


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
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-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-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-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-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, 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-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-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-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-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
Post A Reply



Category Jump: