m
Fixed reportActionButtons() example
(moved code for enumerating from the UnitName page) |
m (Fixed reportActionButtons() example) |
||
| Line 29: | Line 29: | ||
This function will display the contents of each of the 120 action slots (skipping empty ones) in the default chat frame. To use, type "/script reportActionButtions()". | This function will display the contents of each of the 120 action slots (skipping empty ones) in the default chat frame. To use, type "/script reportActionButtions()". | ||
<pre> | |||
function reportActionButtons() | |||
local lActionSlot = 0; | |||
for lActionSlot = 1, 120 do | |||
local lActionText = GetActionText(lActionSlot); | |||
local lActionTexture = GetActionTexture(lActionSlot); | |||
if lActionTexture then | |||
local lMessage = "Slot " .. lActionSlot .. ": [" .. lActionTexture .. "]"; | |||
if lActionText then | |||
lMessage = lMessage .. " \"" .. lActionText .. "\""; | |||
end | |||
DEFAULT_CHAT_FRAME:AddMessage(lMessage); | |||
end | |||
end | |||
end | |||
</pre> | |||