Mercurial > wow > oocdo
changeset 7:e41de98f6b33
.MacroText: explicitly set button type, as newer commands could change it to something else; luadoc.
author | rowaasr13 |
---|---|
date | Tue, 10 Jan 2017 19:39:55 +0300 |
parents | 0a7fd4d73d30 |
children | 3b9bc71a1dd6 |
files | OOCDo.lua |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/OOCDo.lua Tue Jan 10 19:38:52 2017 +0300 +++ b/OOCDo.lua Tue Jan 10 19:39:55 2017 +0300 @@ -18,9 +18,14 @@ 'self:SetAttribute("type", "macro") self:SetAttribute("macrotext", "")' -- post ) +--- Sets button to perform given macro text as-is. +-- Sets button's .type to "macro" and .macrotext to given string verbatim +-- @param command macro text to perform +-- @param command2 same as command, if first argument is "taken" because of : call. function button.MacroText(command, command2) if command == button then command = command2 end if InCombatLockdown() then return end + button:SetAttribute("type", "macro") button:SetAttribute("macrotext", command) end