Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- helper function to create click-cast macros
- local function CreateClickCast(frame, whatType, modifier, button, macroText)
- local remappedButton = whatType..button
- if modifier then
- modifier = modifier.."-"
- else
- modifier = ""
- end
- macroText = string.gsub(macroText, "\r", string.char(13))
- frame:SetAttribute(modifier..whatType.."button"..button, remappedButton)
- frame:SetAttribute(modifier.."type-"..remappedButton, "macro")
- frame:SetAttribute(modifier.."spell-"..remappedButton, nil)
- frame:SetAttribute(modifier.."macro-"..remappedButton, nil)
- frame:SetAttribute(modifier.."bag-"..remappedButton, nil)
- frame:SetAttribute(modifier.."slot-"..remappedButton, nil)
- frame:SetAttribute(modifier.."item-"..remappedButton, nil)
- frame:SetAttribute(modifier.."macrotext-"..remappedButton, macroText)
- end
Add Comment
Please, Sign In to add comment