Download
(17Kb)
Download
Updated: 01-30-07 04:12 AM
Pictures
File Info
Updated:01-30-07 04:12 AM
Created:unknown
Downloads:8,866
Favorites:29
MD5:

Unit Frame Action Bars  Popular! (More than 5000 hits)

Version: 0.9
by: Jasmeralia [More]

This is a fork of PartyBars by mubari. Both Unit Frame Action Bars and PartyBars are designed as replacements for Discord's popular Group Buttons mod, as GB is not compatible with 2.0 (and Loz is busy working on other things at the moment).

Note:

If you want me to help you with a problem, please help me by telling me what unit frame mod(s) you are using. If you don't, then the amount of help I can give you is virtually nil.

Done:
* Allow support for attaching to unit frames rather than requiring the user to drag each bar over to the frame by hand (not very viable for 40 mans, imho). (Added in v.0.4)
* Allow support for alternative unit frames (such as Perl, aguf, etc) (Added in v.0.4)
* Optimized the XML file considerably using template inheritance
* Added support for XPerl (Added in v.0.5)
* Added initial config window (Added in v.0.6)
* Added a separate hostile target bar (as long as you are not in-combat when changing targets, it will hide the friendly target bar and show the hostile bar). (Added in v.0.6.)
* Fixed the Inner Fire Fade hack (finally-- even tested with my newly leveled priest). No longer requires the spell to be placed on the last button, place it anywhere on the player action bar and it will be faded/unfaded appropriately. (v.0.7)
* Fixed rescaling issues so scale is displayed appropriately. (v.0.7)
* Fixed it so that frames are movable again and added a config option to lock the frames. Note that if you move it and lock the frames it may get moved back by the attachment code-- this is something I need to tweak further. ** No longer accurate. ** (v.0.7)
* Added support for German users of the Inner Fire fading hack. (v.0.8)
* Added /ufab showraid command.(v.0.8)
* Added support (untested) for empty bars to optimize button usage. (v.0.8)
* Added config option to hide party bars in raids. (v.0.8)
* Added code to detect x/y offsets when a frame is dragged and save them. (v.0.9)
* Fixed bug where UFAB would try to autodetect raid frames with main style rather than raid style. (v.0.9)
* Fixed CTUF raid detection and CTUF/XPerl frame name code. (v.0.9)
* Added code to ignore unsupported frame combinations (ToTT and Blizzard UI, etc.) so they will not generate errors/warnings. (v.0.9)
* Added /ufab resetall command. (v.0.9)
* Added /ufab raidreset command. (v.0.9)

Todo:

* Improve support and detection for other unit frames (works best with Perl Classic frames)
* Improve config interface
* Allow support for vertical action bars (so you could have 2-3 bars by each raid frame to keep screen real-estate to a minimum)
* Fix target/empty target frames
* Add config support for controlling number of buttons assigned to bars
* Get rid of the 120 standard button limit
* Add config support for attachment point offsets

Please help me support other unit frames by noting when you get errors about frames being unknown and what frame add-ons you are using. If you can find out the name of the unknown frame, even better.

At this point, unknown frames should default to the standard draggable bar. All known frames should auto-attach themselves correctly. If you get a message about the attachment failing, please note which frame and what add-ons you are using... it's possible either the detection was incorrect, or I got the name of the frame wrong.

AGUF users: I believe that agUF should be properly supported at this time, thanks to DUF's FrameFinder. There does seem to be a timing issue sometimes where UFAB will try to attach to the agUF frame before agUF finishes creating the frame. A simple "/ufab partyreset" should fix this.

XPerl users: I believe that I have the raid frames correct, but please test it out and let me know how it works. (I often code from work and can only do minimal testing.)

Hostile/Friendly target bars: Please let me know how this works out for you all. I can potentially see an issue where you are in-combat and changing from a friendly target to a hostile target and it cannot swap the bar due to the UI Protection Blizzard has implemented. If this is an active issue I am open to suggestions as to how to design a viable workaround (perhaps show both bars and change alpha-colors to make buttons invisible? They would still be clickable but it would be almost like hiding the bar...)

Blank target bar buttons: I'm aware of this issue and am working to resolve it.

Optional Files (0)


Post A Reply Comment Options
Unread 01-16-07, 06:32 PM  
Deca
A Kobold Labourer

Forum posts: 0
File comments: 27
Uploads: 0
How's it going Jas? There was so much activity there for awhile, but haven't heard anything since. Maybe your busy with real life, that's ok then.
Report comment to moderator  
Reply With Quote
Unread 01-13-07, 04:21 PM  
grey_falcon1
A Kobold Labourer

Forum posts: 0
File comments: 14
Uploads: 0
How do I make it to where the bars do not reset to their default position?!?! I move the bar over to under my player stats then lock the bar and action bars but then when I click on someone else it just goes back to where it was.

Matt
Report comment to moderator  
Reply With Quote
Unread 01-07-07, 12:44 PM  
Jasmeralia
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 45
Uploads: 1
GetPoint bugged atm...

Ok... I've been playing with GetPoint and it's not reliable at the moment. There is a Blizzard bug with dragging frames and using GetPoint at the moment (see this link: http://forums.worldofwarcraft.com/th...48687275&sid=1). I'll need to test this code after the next patch and see how it works then.

I'm not sure if I'll have time to make an interim release between now and Tuesday night. We'll have to see.
Last edited by Jasmeralia : 01-07-07 at 12:44 PM.
Report comment to moderator  
Reply With Quote
Unread 01-07-07, 08:15 AM  
skyflash
A Kobold Labourer

Forum posts: 0
File comments: 8
Uploads: 0
Arrow Re: Re: Re: Re: Re: Re: Error messages

Originally posted by Jasmeralia
Ok. I looked at the DUF code and do not see support for ToTT. Do you know the name of the frame?
I am sorry, the standard DUF does not support it.. just my personal copy does. I thought it did, but I obviously was wrong... I have been running a fork for some time now.

I did however fix my detection for CT_RA, I also changed it for XPerl, but I am not sure it uses the same frame names as CT_RA, so there may be a +/- 1 missing for XPerl.

Here is the file:

http://magelore.de/files/UFActionBarsDetect.lua

Run it through WinMerge to see what I changed..... maybe you can use one or two of those changes. *g*

I will be gone for the week, so I will check back for your new release next weekend.
Report comment to moderator  
Reply With Quote
Unread 01-07-07, 06:14 AM  
Jasmeralia
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 45
Uploads: 1
Re: Re: Re: Re: Re: Error messages

Originally posted by skyflash
No, DUF does support it, but you did not put the line into your mod. If you look at your detect code, you will see that the DUF part is missing the ToTT case, but the other styles do have it. But yes, unsupported frames should be recognized as well....

BTW... would be great, if we can get rid of those black movement boxes all over the screen, they are not really needed if the frames are attached or locked, so they should be hidden in those cases.
Ok. I looked at the DUF code and do not see support for ToTT. Do you know the name of the frame?
Report comment to moderator  
Reply With Quote
Unread 01-07-07, 04:59 AM  
skyflash
A Kobold Labourer

Forum posts: 0
File comments: 8
Uploads: 0
Re: Re: Re: Re: Error messages

Originally posted by Jasmeralia
Do you mean that DUF doesn't support ToTT? That's the impression I got from looking at the code. I'll add in code to track "unsupported" frames so they won't generate warnings.
No, DUF does support it, but you did not put the line into your mod. If you look at your detect code, you will see that the DUF part is missing the ToTT case, but the other styles do have it. But yes, unsupported frames should be recognized as well....

BTW... would be great, if we can get rid of those black movement boxes all over the screen, they are not really needed if the frames are attached or locked, so they should be hidden in those cases.
Report comment to moderator  
Reply With Quote
Unread 01-07-07, 02:18 AM  
Jasmeralia
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 45
Uploads: 1
My brief testing showed some problems with 0.9, so I'll be working on that when I have some time at home.
Report comment to moderator  
Reply With Quote
Unread 01-07-07, 12:15 AM  
Jasmeralia
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 45
Uploads: 1
Re: Target Bars

Originally posted by Kilzon
>>"Hostile/Friendly target bars: Please let me know how this works out for you all. I can potentially see an issue where you are in-combat and changing from a friendly target to a hostile target and it cannot swap the bar due to the UI Protection Blizzard has implemented. If this is an active issue I am open to suggestions as to how to design a viable workaround (perhaps show both bars and change alpha-colors to make buttons invisible? They would still be clickable but it would be almost like hiding the bar...)"

There should be a way to do it, as AlarTTFrame has this functionality, and it switches from Hostile to Friendly targets and back with no problem, even within combat. I am using it now because it is the only thing i've found so far that simulates Group Buttons' target bar. Unfortunately AlarTTFrame only allows 6 buttons for the bar, so it's a little limited.

I wish I could help you out with this but I have no experience whatsoever in LUA.
Thanks, I'll have to check that mod out and see how they handled it.
Report comment to moderator  
Reply With Quote
Unread 01-07-07, 12:10 AM  
Kilzon
A Kobold Labourer

Forum posts: 0
File comments: 13
Uploads: 0
Target Bars

>>"Hostile/Friendly target bars: Please let me know how this works out for you all. I can potentially see an issue where you are in-combat and changing from a friendly target to a hostile target and it cannot swap the bar due to the UI Protection Blizzard has implemented. If this is an active issue I am open to suggestions as to how to design a viable workaround (perhaps show both bars and change alpha-colors to make buttons invisible? They would still be clickable but it would be almost like hiding the bar...)"

There should be a way to do it, as AlarTTFrame has this functionality, and it switches from Hostile to Friendly targets and back with no problem, even within combat. I am using it now because it is the only thing i've found so far that simulates Group Buttons' target bar. Unfortunately AlarTTFrame only allows 6 buttons for the bar, so it's a little limited.

I wish I could help you out with this but I have no experience whatsoever in LUA.
Report comment to moderator  
Reply With Quote
Unread 01-06-07, 11:58 PM  
Jasmeralia
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 45
Uploads: 1
Re: Re: Re: Error messages

Originally posted by skyflash
But there is.... you forgot to program one case...

elseif (frame_type == FRAME_TOTT) then

This frame is missing for DUF.... so it will fail every time that the TOTT frame comes along.
Do you mean that DUF doesn't support ToTT? That's the impression I got from looking at the code. I'll add in code to track "unsupported" frames so they won't generate warnings.
Report comment to moderator  
Reply With Quote
Unread 01-06-07, 10:12 PM  
Jasmeralia
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 45
Uploads: 1
Thanks borohir and skyflash.

I'll probably put together 0.9 tonight at work. I like the work you did, borohir, but I want to make it use GetPoint instead of GetLeft/GetTop. This way I can still call AttachFrame, I just need to pass x/y offsets... and if you move the unit frame, it will move the bars with it.

I can then add in the code for /ufab resetpos which will simply wipe all the x/y offsets and put them back to 0, which I think is the better way to do it.
Report comment to moderator  
Reply With Quote
Unread 01-06-07, 06:56 PM  
skyflash
A Kobold Labourer

Forum posts: 0
File comments: 8
Uploads: 0
Re: Re: Error messages

Originally posted by Jasmeralia
Huh. Didn't think there was a problem with DUF support (I pulled the names from the code itself), but I'll take a look at that. Other people have already mentioned CTRA already, it's on the list.
But there is.... you forgot to program one case...

elseif (frame_type == FRAME_TOTT) then

This frame is missing for DUF.... so it will fail every time that the TOTT frame comes along.

Also, for CT_RA there are more bugs:

elseif (frame_type == FRAME_RAID) then
local group = frame_number / 5
local unit = frame_number % 5
frame_name = "CTRAGroup"..group..unit

See, if the framenumber is for example 12, then group will be = 12 / 5 = 2.4, and unit will be 2.

And the resulting name will be "CTRAGroup2.42", which is of course totally wrong.... and even if it would round to an integer, it would still be wrong, because as far as I know the CTRA groups are numbered between 1 and 8, and your calculation will result in numbers between 0 to 7. Also, of course the base name is wrong...

You should try something along the lines of:

elseif (frame_type == FRAME_RAID) then
local unit = frame_number % 5 + 1
local group = (frame_number - unit - 1) / 5 + 1
frame_name = "CT_RAGroup"..group.."UnitButton"..unit

I think that still is not totally correct, I just did it now OTOFM without debugging or even running it, but that's the general idea. Normally to get the CT_RA frame you should make a call like "CT_RA_UnitIDFrameMap["raid"..i]", but I am not 100% sure how that works. That bug btw is why XPerl is not working either, it has the same wrong calculation...

Then below... this needs to be added too... the code is currently unable to detect that you have CT_RA as raid frames:

elseif (getglobal("CT_RAGroup1UnitButton1")) then
frame_style = STYLE_CTUF

Looking forward to the next version!!
Last edited by skyflash : 01-06-07 at 07:13 PM.
Report comment to moderator  
Reply With Quote
Unread 01-06-07, 02:25 PM  
borohir
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 54
Uploads: 1
Saving Positions

Hi Jas,
I really like your mod! It keeps getting better and better! I made a quick change to save positions of bars, instead of them always jumping back to the attach point. Pretty simple, maybe you can use. Using this there is no way to get back to attach points, but maybe a config option or something can be added. Not the greatest thing ever, but maybe help..I did this in 0.7..

Here are functions:

Added a dragstop, so pos is saved after a drag (called from the XML):

function UFAB_StopDrag(frame)
frame:StopMovingOrSizing();
local n = frame:GetName();
if (UFAB_Config[UFAB_Realm][UFAB_Char][n] == nil) then
UFAB_Config[UFAB_Realm][UFAB_Char][n] = {};
end;
UFAB_Config[UFAB_Realm][UFAB_Char][n]["LEFT"] = frame:GetLeft();
UFAB_Config[UFAB_Realm][UFAB_Char][n]["TOP"] = frame:GetTop();
end;

Added a set pos in FrameChecks:

function UFAB_SetPosition(frame)
local n = frame:GetName();
if (UFAB_Config[UFAB_Realm][UFAB_Char][n] == nil) then
return(false);
end;

local x = UFAB_Config[UFAB_Realm][UFAB_Char][n]["LEFT"];
local y = UFAB_Config[UFAB_Realm][UFAB_Char][n]["TOP"];
frame:ClearAllPoints();
frame:SetPoint("TOPLEFT",UIParent,"BOTTOMLEFT",x, y);
frame:Show();
return(true);
end;

Call this aound line 45 or so, just before frame2 = getglobal(frame2_n):

if (UFAB_SetPosition(frame1)) then
return;
end;
Last edited by borohir : 01-06-07 at 02:27 PM.
Report comment to moderator  
Reply With Quote
Unread 01-06-07, 12:56 PM  
Jasmeralia
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 45
Uploads: 1
Re: Error messages

Originally posted by skyflash
UFAB_AttachFrame: frame2 unknown, displaying UFABRaid11BarFrame

I get the same message for target bars and all other raid bars. I do have CTRA and Discord Unit Frames installed. I don't have time right now, but when I get some I will fix it and tell you how I did it.

Frame Names:

DUF_FocusFrame
DUF_TargetOfTargetFrame
DUF_TargetFrame
DUF_PlayerFrame

CT_RAGroup1UnitButton1
CT_RAGroup1UnitButton2
CT_RAGroup2UnitButton1
...
...
Huh. Didn't think there was a problem with DUF support (I pulled the names from the code itself), but I'll take a look at that. Other people have already mentioned CTRA already, it's on the list.
Report comment to moderator  
Reply With Quote
Unread 01-06-07, 12:55 PM  
Jasmeralia
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 45
Uploads: 1
Originally posted by skyflash
if (GetNumRaidMembers() > 0) then
for i = 1, 40 do
UFAB_AttachFrame("UFABRaid"..i.."BarFrame", UFAB_FrameName(FRAME_RAID, i, style_main), "raid"..i)
end
else
for i = 1, 40 do
getglobal("UFABRaid"..i.."BarFrame"):Hide()
end
end

copy paste error in your raid code.... should be style_raid, not style_main. Sorry, cant download 0.8 yet.
Thanks, I'll fix that in 0.9.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: