# HG changeset patch # User contrebasse # Date 1291994320 -3600 # Node ID 120f29645e3402f6ae3231112a6cd005578dd78c # Parent 66640a8f1cbd303baea1946ac18e98454da7ae45 Do not forget to change function's name in Bindings.xml diff -r 66640a8f1cbd -r 120f29645e34 Bindings.xml --- 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 @@ - ToggleAutoDegaine(); + Degaine_ToggleAuto(); diff -r 66640a8f1cbd -r 120f29645e34 Degaine.lua --- 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