Guest User

class icons by Cold

a guest
Jan 14th, 2013
21
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.79 KB | None | 0 0
  1.         local ClassIcons = {}
  2.         if myClass == "MONK" or myClass == "PRIEST" or myClass == "PALADIN" then   
  3.           for index = 1, 5 do
  4.             local Icon = CreateFrame("Frame", "coldCI"..index, self)
  5.             Icon.UpdateTexture = dummy
  6.             Icon:SetSize(10, 10)
  7.             Icon:SetBackdrop(backdrop)
  8.             Icon:SetBackdropBorderColor(0,0,0)
  9.             Icon:SetFrameLevel(6)
  10.             ClassIcons[index] = Icon
  11.            
  12.             if myClass == "WARLOCK" then
  13.                 Icon:SetScale(.0001)
  14.             end
  15.           end
  16.           -- Position (made it backwards to right align)
  17.           for backindex = 5, 1, -1 do
  18.             if backindex == 5 then
  19.               ClassIcons[backindex]:SetPoint('BOTTOMRIGHT', Health, 'BOTTOMRIGHT', -2, 2)
  20.             else  
  21.               ClassIcons[backindex]:SetPoint('RIGHT', ClassIcons[backindex+1], 'LEFT', -2, 0)
  22.             end  
  23.           end  
  24.         end
  25.         self.ClassIcons = ClassIcons
Advertisement
Add Comment
Please, Sign In to add comment