Mercurial > wow > degaine
changeset 6:120f29645e34
Do not forget to change function's name in Bindings.xml
author | contrebasse |
---|---|
date | Fri, 10 Dec 2010 16:18:40 +0100 |
parents | 66640a8f1cbd |
children | f8198806d261 |
files | Bindings.xml Degaine.lua |
diffstat | 2 files changed, 14 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/Bindings.xml Fri Dec 10 16:04:55 2010 +0100 +++ b/Bindings.xml Fri Dec 10 16:18:40 2010 +0100 @@ -1,5 +1,5 @@ <Bindings> <Binding name="Activer/désactiver" header="DEGAINE"> - ToggleAutoDegaine(); + Degaine_ToggleAuto(); </Binding> </Bindings>
--- a/Degaine.lua Fri Dec 10 16:04:55 2010 +0100 +++ b/Degaine.lua Fri Dec 10 16:18:40 2010 +0100 @@ -12,7 +12,7 @@ -- Globals to local --------------------------------------------------------------- -- These need to be globals --- GLOBALS: ToggleAutoDegaine, Degaine_isAuto, BINDING_HEADER_DEGAINE +-- GLOBALS: Degaine_ToggleAuto, Degaine_isAuto, BINDING_HEADER_DEGAINE -- It doesn't matter if they are globals -- GLOBALS: DEFAULT_CHAT_FRAME, GossipFrame @@ -76,11 +76,6 @@ --------------------------------------------------------------- --- Events registering ---------------------------------------------------------------- - - ---------------------------------------------------------------- -- Timer --------------------------------------------------------------- -- Wait a few seconds before drawing, to be able to see the curren animation (and avoid bugs) @@ -121,7 +116,7 @@ DegaineFrame:SetScript("OnUpdate", nil); done = true; end -ToggleAutoDegaine = function() +Degaine_ToggleAuto = function() if Degaine_isAuto then Degaine_isAuto = false desactivate() @@ -181,6 +176,17 @@ end) +--------------------------------------------------------------- +-- Commands +--------------------------------------------------------------- +-- Bindings +BINDING_HEADER_DEGAINE = "Dégainer automatiquement" + +-- Slash command +-- GLOBALS: SLASH_DEGAINE +SLASH_DEGAINE = "/degaine" +SlashCmdList["DEGAINE"] = Degaine_ToggleAuto + --------------------------------------------------------------- -- Initialization