Advertisement
Guest User

Untitled

a guest
Jun 29th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. function DuskButtons()
  2. local buttonsize = 32;
  3. -- Item order: Topleft, Topright, Bottomleft, Bottomright
  4. local items = {"Hearthstone", "Wormhole Generator: Northrend", "Dark Jade Focusing Lens", "Shadow Crystal Focusing Lens"};
  5. local anchor = "RIGHT";
  6. local xoffset = -100;
  7. local yoffset = 0;
  8.  
  9. for i = 1, 4 do
  10. local button = CreateFrame("CheckButton", "DuskButton"..i, UIParent, "SecureActionButtonTemplate");
  11.  
  12. button:SetAttribute("type", "item");
  13. button:SetAttribute("item", items[i]);
  14.  
  15. local xoffsets = {-1, 0, -1, 0};
  16. local yoffsets = {0, 0, -1, -1};
  17.  
  18. button:SetWidth(buttonsize);
  19. button:SetHeight(buttonsize);
  20. button:SetPoint(anchor, UIParent, anchor, xoffset+(xoffsets[i]*(buttonsize+5)), yoffset+(yoffsets[i]*(buttonsize+5)));
  21. end
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement