Scriptaction script onupdating

06-Aug-2017 15:26

Next, we use On Event to actually do something when the event fires. -- Globals -- so we know when our configuration is loaded my Clock_variables Loaded = false; -- for configuration saving my Clock Realm = Get CVar("realm Name"); my Clock Char = Unit Name("player"); -- details used by my Add Ons my Clock_details = ; -- default config settings local my Clock Config_default On = true; -- addon enabled?

local my Clock Config_default Time24 = true; -- 24 hour format?

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.

You might notice that once you display your config frame, there's no way to get rid of it!

Feel free to make it any size, and the ANCHOR point="CENTER" will make sure it is dead center on the screen no matter the resolution.

You'll probably want some kind of title on it to say what mod's options it is, so here's some Layers info to do that: within my Clock Config That should make a small title box appear, and you'll notice the Font String's text attribute is set to "Clock Config" -- you can change this to anything you want.

in case they dragged it away my Clock Indicator Frame: Set Point("TOPLEFT", "Minimap Cluster", "TOPLEFT", 122, -28); -- wow automatically saves the location of frames on the screen!

-- make sure the defaults are loaded onto our mod frame my Clock_Config Change(); end ...

You might notice that once you display your config frame, there's no way to get rid of it!Feel free to make it any size, and the ANCHOR point="CENTER" will make sure it is dead center on the screen no matter the resolution.You'll probably want some kind of title on it to say what mod's options it is, so here's some Layers info to do that: within my Clock Config That should make a small title box appear, and you'll notice the Font String's text attribute is set to "Clock Config" -- you can change this to anything you want.in case they dragged it away my Clock Indicator Frame: Set Point("TOPLEFT", "Minimap Cluster", "TOPLEFT", 122, -28); -- wow automatically saves the location of frames on the screen!-- make sure the defaults are loaded onto our mod frame my Clock_Config Change(); end ...Let's fix that right away by adding a `Close' button: within my Clock Config This button, which you'll notice is anchored at the bottom right of the config frame, simply tells our configuration frame to hide.