Guest User

Untitled

a guest
Feb 18th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. function MakeUnitFrame(unit)
  2. local rc = CreateFrame("Frame", "MyUnitFrame_"..unit, UIParent, "SecureUnitButtonTemplate")
  3.  
  4.  
  5. rc:SetAttribute("unit", unit)
  6. RegisterUnitWatch(rc)
  7.  
  8. rc:SetPoint("CENTER", UIParent, "CENTER", 0, 0)
  9. rc:SetWidth(256)
  10. rc:SetHeight(256)
  11.  
  12. rc.background = rc:CreateTexture(nil, "BACKGROUND")
  13. rc.background:SetPoint("TOPLEFT", rc, "TOPLEFT", 0, 0)
  14. rc.background:SetPoint("BOTTOMLEFT", rc, "BOTTOMLEFT", 0, 0)
  15. rc.background:SetWidth(rc:GetWidth())
  16. rc.background:SetTexture(0, 0, 0, 0.5)
  17. end
Add Comment
Please, Sign In to add comment