Advertisement
alexdubovyck

своя иконка и галочка

Jan 14th, 2018
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. Вместо вот этого
  2. https://i.imgur.com/fk1KEcT.jpg
  3. вот это
  4. https://i.imgur.com/Jow89VC.jpg
  5.  
  6. тут и иконка своя и галочка
  7.  
  8. if not dai_lapu then
  9.  
  10.  
  11.  
  12.  
  13. local f = CreateFrame("CheckButton", "giftlapa", UIParent, "ChatConfigCheckButtonTemplate")
  14. f:SetSize(50, 50)
  15. f:SetHitRectInsets(5, 5, 5, 5)
  16. f:SetParent(MultiBarBottomLeftButton12)
  17. f:SetPoint("CENTER", 0, 38)
  18. f.tooltip = "Лапа"
  19. f:SetScript("OnUpdate", function()
  20.  
  21. if f:GetChecked() == 1 then
  22. laparaid = 1
  23. if not UnitBuff("player", GetSpellInfo(79101)) then
  24. Cast(20217)
  25. end
  26. else
  27. laparaid = 0
  28. end
  29.  
  30. end)
  31.  
  32. local f = CreateFrame("Button", nil, UIParent, "SecureActionButtonTemplate, ActionButtonTemplate");
  33. f:SetParent(MultiBarBottomLeftButton12)
  34. f:SetPoint("CENTER", 0, 0)
  35. f:RegisterForClicks("AnyDown")
  36. f:SetSize(36, 36)
  37. f:SetAttribute("type", "macro");
  38. f:SetAttribute("macrotext",[[
  39. /click
  40. /run print('Вы click')
  41. ]])
  42. -- Icon:
  43. local icon = f:CreateTexture()
  44. icon:SetAllPoints(true)
  45. icon:SetTexture("Interface\\AddOns\\RotMode\\kaska kulak")
  46. f.icon = icon
  47. f:SetFrameStrata("HIGH");
  48.  
  49. dai_lapu = true end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement