Thread Tools Display Modes
09-05-07, 09:38 AM   #1
Alestane
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 234
[RFC] Stock ActionBar revision (technical)

The back story: large parts of the Bliz UI cannot be functionally modified due to tainting issues. Their behavior can be apparently modified by hiding the stock elements and supplying replacements, but this approach is not satisfying to me.

Now, I know that the devs are in favor of good code, but the're also busy, frequently with cool new features. So, I've set out on a project to gradually update the FrameXML code, especially using secure templates and attributes for secure behavior whenever possible, to make the UI code as moddable as possible. It is my hope that this work will make it easier for the devs to rapidly incorporate robust, highly functional code into the stock UI.

Step one does some foundation work on the secure templates and tackles the main action bar.

Visible Changes: The slide animation for going into and out of Shadowform and Stealth has disappeared. It does not require secure functions and could be replaced, but it was giving me a headache and I wanted to get a proof of concept out. All other visible changes in the behavior of the UI as a result of this code are unintended and should be addressed.

API Changes: While no changes to the API are REQUIRED for this update, allowing ChangeActionBarPage to accept values outside 1-6 will allow some of the new function to reach their full potential.

Functional changes:

Secure Action Buttons and related templates now support states on most attributes, if the corresponding "checkstate-<attributename>" attribute is set. A frame's state can be defined from an internal 'state' integer/string attribute (for conventional stateheaders and multi-inheritance), from a 'stateheader' attribute referring to a frame (for detached headers) or through 'useparent-state'. State does not support modifiers or buttons. Calls wishing to use SecureButton_GetModifiedAttribute without parsing the attribute for state can supply the boolean value false (NOT nil) anywhere after the button parameter (fourth, fifth, or sixth parameter).

State-sensitive attributes can be stored as tables of [state] = value pairs, for circumstances where separator characters need to be used in attribute contents. (This will probably be removed.)

Action Bar Buttons have been rewritten to use parameters rather than globals (self > this) as much as possible.

Action Bar Buttons now use an actionoffset attribute (usually inherited from the parent action bar) to determine what their ID should be added to for ActionButton_GetPagedID(). This is used in the hope that ChangeActionBarPage() will eventually accept values outside 1-6, for use with smaller bars that support more pages (for instance 12 pages of eight slots each with three reserved for stances). Note, however, that the stock bar does not support pages greater than 6; my expectation is that it will go blank in these cases.

The MultiActionBars have been rewritten to use these attributes with vastly simplified templates.

The main actionbar buttons are now children of a state header that sets their page according to current page and stance automatically.

Action buttons now update their appearances whenever one of several attributes that can define their behavior change.

Bindings for the action bars are now CLICK bindings. A glue function has been added to make sure these bindings recover the keys bound to the old ACTIONBUTTON scripts.

The supplied files are derived from a fairly recent PTR build (7175 I believe)

Changed Files list:
ActionBarFrame.xml
ActionButton.lua
Bindings.xml
BonusActionBarFrame.lua
MultiActionBars.lua
MultiActionBars.xml
SecureStateHeader.lua
SecureTemplates.lua

Comments and feedback are gratefully appreciated, preferably in this Blizzard thread: http://forums.worldofwarcraft.com/th...12518674&sid=1.
Attached Files
File Type: zip FrameXML.diff.txt.zip (12.9 KB, 770 views)
File Type: zip ChangedFiles.zip (119.4 KB, 728 views)
File Type: zip FrameXML.changed.zip (713.3 KB, 719 views)

Last edited by Alestane : 09-09-07 at 06:52 PM. Reason: Reduced scope of project
  Reply With Quote
09-05-07, 11:51 AM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Won't this break other addons? This is why authors are generally discouraged from modding the Blizzard files, is it not? Unless I'm confused...
__________________
"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

  Reply With Quote
09-05-07, 11:58 AM   #3
Alestane
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 234
The purpose is to arrive at a body of code that can be submitted to Blizzard for incorporation into the standard code. Maintaining maximum compatibility with the current API is a priority, and the goal is to allow UI authors more freedom in modifying the stock UI without breaking anything.
  Reply With Quote
09-05-07, 12:26 PM   #4
Cladhaire
Salad!
 
Cladhaire's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Jul 2005
Posts: 1,935
Originally Posted by Seerah
Won't this break other addons? This is why authors are generally discouraged from modding the Blizzard files, is it not? Unless I'm confused...
First off, you misunderstand. This doesn't modify Blizzard's files, because we can't. This is a post that has been directed to slouken so he can consider incorporating it into a future version of WoW, adding functionality to the default UI so it can more easily be modified by addons.

This is in no way discouraged.
__________________
"There's only one thing that I know how to do well and I've often been told that you only can do what you know how to do well, and that's be you-- be what you're like-- be like yourself. And so I'm having a wonderful time, but I'd rather be whistling in the dark..."
  Reply With Quote
09-05-07, 12:42 PM   #5
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Thank you for the clarification.
__________________
"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

  Reply With Quote
09-05-07, 07:35 PM   #6
Shazear
A Fallenroot Satyr
 
Shazear's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 21
This is an awesome idea by the way. I applaud your efforts.
__________________
Shazear:
Shizukana (Holy Priest)
UnShiz (UnHoly Death Knight)
Veterans of the Phoenix
Malygos
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » [RFC] Stock ActionBar revision (technical)


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