Note: For a list of changes in previous patches, please see thread titled: UI Add-On Changes Compilation.
In a pre-Warlords of Draenor patch, there will be a number of updates and changes to functions that affect how User Interface Add-Ons will work. Add-Ons in the Beta client has been enabled and will allow UI Add-On authors will have a chance to work on updating their Add-Ons and test these changes out. To help keep things organized, please specify the section you’re referencing when providing feedback. == Saving Keybinds/Macros/UI Settings == Saving keybinds/macros/UI settings has changed a little. Most of the changes were on the backend to make things more in-line with our current architecture. The main is difference is we no longer compare local versions with the server versions of keybinds/macros/UI settings to determine which ones to load on the client. Instead, we have local CVars that toggle looking at local files or server files. All clients default to server side storage. If you don’t want that, you can change the following CVars to only look at local files instead.
“synchronizeBindings” [0/1] – defaults to 1 which will save character & account keybindings to the server. “synchronizeMacros” [0/1] – defaults to 1 which will save character & account macros to the server. “synchronizeSettings” [0/1] – defaults to 1 which will save all character & account information to the server (this is exactly like setting the previous three to 1 or 0). == Add-On Communications == Add-on communication is now available through custom chat channels.
== KeyValues == To enable the creation of better self-contained templates that are easier to configure, (i.e. you don’t have to remember to override the OnLoad and call the original) we’re allowing both key and value types to be modified using “keyType” and “type” respectively. The default for both is “string”. Other available options are: string, boolean, number, global (where the value is looked up in the global table). When we make templates that make use of this sort of option, we plan to add a commented out KeyValues section listing all available options so you don’t have to go digging through the code. Example: <Frame name="RoleButtonTemplate" virtual="true"> == Atlas == Atlases are textures with mappings onto standard textures that include normalized texture coordinates.
Example: XML <Texture atlas="_Garr_InfoBox-Top" horizTile="true" useAtlasSize="true"> Lua filename, width, height, left, right, top, bottom, tilesHoriz, tilesVert = GetAtlasInfo("name") == New Timer System == There is a new timer system being added in. Documentation is available in C_TimerAugment.lua Functions:
timer = C_Timer.NewTimer(duration, callback) – Calls callback after duration seconds. This is more expensive than C_Timer.After, so this only should be used if you need it to be cancellable. timer:Cancel() – Cancels a timer ticker = C_Timer.NewTicker(duration, callback, iterations) – Calls callback every duration seconds (up to iterations times) ticker:Cancel() – Cancels a ticker == Animation System == Animation system is receiving a few changes and various bug fixes. Alpha animation has fromAlpha and toAlpha. This is a variant from just a change delta. Scale animataion has fromScale and toScale. childKey is the same as targetKey with automatically pre-pending “$parent.$parent.” AnimGroups now have a “setToFinalAlpha” setting that will apply the animations final resulting alpha to all animating regions. Reminder: To help keep things organized, please specify the section you’re referencing when providing feedback. |
|
Unfortunately, the CVar system is only either/or. If we made them account-wide, no one would be able to make them work on a per-character basis. However, we reevaluate the CVars and their defaults from time-to-time. We’ll keep these in mind, but will likely err on the side of leaving them character based.
The system doesn't support creating your own; it's tied to our internal database and editors. You only need to know about our atlas if you reuse our textures. There's no PNG support in Warlords of Draenor, but we may reevaluate this in the future.
Fixed it, thanks for letting me know. :) I'll get a lot of use out of the <KeyValues> and the C_Timer stuff. UI Add-Ons haven't been enabled yet on Beta. This is just an advanced heads-up to give you guys time to prep. |
|
Hello Galvin, the UI team has the following to say over concerns with regards to overhead and efficiency. In most cases, initiating a second C_Timer is still going to be cheaper than using an Animation or OnUpdate. The issue here is that both Animation and OnUpdate calls have overhead that applies every frame while they are active. For OnUpdate, the overhead lies in the extra function call to Lua. For Animations, we’re doing work C-side that allows us to support smoothing, parallel animations, and animation propagation. In contrast, the new C_Timer system uses a standard heap implementation. It’s only doing work when the timer is created or destroyed (and even then, that work is fairly minimal). The one case where you’re better off not using the new C_Timer system is when you have a ticker with a very short period – something that’s going to fire every couple frames. For example, you have a ticker you want to fire every 0.05 seconds; you’re going to be best served by using an OnUpdate function (where about half the function calls will do something useful and half will just decrement the timer). (As a side note, accuracy of AnimationGroups is exactly the same as that of OnUpdate calls or C_Timer calls. They are all checked once per-frame.) |