Scriptaction script onupdating
Beyond specifying animations in markup, they're also easy to use in code so you can add professional looking transitions and visual effects to your Toolkit components and controls.
Making a GUI Config/Options dialog for your addon is always a bit tricky, however this HOWTO will hopefully help you in such an endeavor.
Also to have a config dialog that remembers it's settings between game sessions, you will need to use the Saved Variables directive.
my Clock.toc: Before changes This HOWTO uses my Add Ons to show the config dialog because it is much simpler then creating a slash command.
Since a config dialog is usually added to an existing addon, this HOWTO will use an existing addon as an example, but we encourage you to use your own addon while following this HOWTO.
This HOWTO is not meant to reproduce my Clock in any shape or form, and you'll notice that the code has been changed in a number of places.
There are many popular ways of doing this, you can create slash commands (learn more at HOWTO: Create a Slash Command), a right click menu, but for now we will stay simple, and just have a frame popup when you use my Addons to display the options.
From inside the game, you can hit the 'ESCAPE' key and chose the 'Addons' item to have my Addons open.
They differ from regular animations which perform an operation in small steps over a period of time.
local my Clock Config_default Time24 = true; -- 24 hour format?
local my Clock Config_default Offset = 0; -- time offset? These are needed to create a table of settings, per-realm, per-character. This way changing configuration options on one character does not change them for all your characters!
Since the animation framework is based on a hierarchy of animation classes, all the animations have the properties which runs its child animations sequentially, waiting for each to finish before starting the next.
To use these animations in the generic XML animation declaration syntax, we include their child animations as nested XML elements.