Added tag v3 for changeset 5657de65ebc4
author |
rowaasr13 |
date |
Thu, 03 Nov 2016 19:43:58 +0300 |
parents |
56099742e29b |
children |
0a7fd4d73d30 |
rev |
line source |
rowaasr13@0
|
1 -- [AUTOLOCAL START]
|
rowaasr13@0
|
2 local CreateFrame = CreateFrame
|
rowaasr13@0
|
3 local InCombatLockdown = InCombatLockdown
|
rowaasr13@0
|
4 local SecureHandlerWrapScript = SecureHandlerWrapScript
|
rowaasr13@0
|
5 local print = print
|
rowaasr13@0
|
6 local type = type
|
rowaasr13@0
|
7 -- [AUTOLOCAL END]
|
rowaasr13@0
|
8
|
rowaasr13@0
|
9 local frame_name = "OOCDo"
|
rowaasr13@0
|
10 local button = CreateFrame("Button", frame_name, nil, "SecureActionButtonTemplate,SecureHandlerMouseUpDownTemplate")
|
rowaasr13@0
|
11 button:SetAttribute("type", "macro")
|
rowaasr13@0
|
12 button:SetAttribute("macrotext", "")
|
rowaasr13@0
|
13 SecureHandlerWrapScript(
|
rowaasr13@0
|
14 button, -- frame
|
rowaasr13@0
|
15 "OnClick", -- script
|
rowaasr13@0
|
16 button, -- header
|
rowaasr13@0
|
17 'return nil, "reset"', -- pre
|
rowaasr13@0
|
18 'self:SetAttribute("macrotext", "")' -- post
|
rowaasr13@0
|
19 )
|
rowaasr13@0
|
20
|
rowaasr13@2
|
21 function button.MacroText(command, command2)
|
rowaasr13@0
|
22 if command == button then command = command2 end
|
rowaasr13@0
|
23 if InCombatLockdown() then return end
|
rowaasr13@0
|
24 button:SetAttribute("macrotext", command)
|
rowaasr13@0
|
25 end
|
rowaasr13@0
|
26
|
rowaasr13@0
|
27 button.Macro = button.MacroText
|
rowaasr13@0
|
28 button.T = button.MacroText
|
rowaasr13@0
|
29 button.M = button.MacroText |