Quantcast
WoWInterface - View Single Post - Run a slash command from a button
View Single Post
06-17-21, 08:44 PM   #2
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,537
Lua Code:
  1. local f1 = CreateFrame("Button", nil, UIParent, "SecureActionButtonTemplate, UIPanelButtonTemplate")
  2. f1:SetSize(80, 30)
  3. f1:SetPoint("CENTER")
  4. f1:SetText("Logout")
  5. f1:SetAttribute("type", "macro")
  6. f1:SetAttribute("macrotext", "/logout")
  7.  
  8. local f2 = CreateFrame("Button", nil, UIParent, "UIPanelButtonTemplate")
  9. f2:SetSize(80, 30)
  10. f2:SetPoint("TOP", f1, "BOTTOM")
  11. f2:SetText("FStack")
  12. f2:SetScript("OnClick", function(self)
  13.     if not FrameStackTooltip_Toggle then
  14.         LoadAddOn("Blizzard_DebugTools")
  15.     end
  16.     FrameStackTooltip_Toggle()
  17. end)
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote