Advertisement
alexdubovyck

02 - GRotSwitch

Feb 21st, 2016
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.90 KB | None | 0 0
  1. if not vrot then
  2.  
  3. local f = CreateFrame("Frame")
  4. f:SetSize(64, 64)
  5. f:SetPoint("CENTER", FramerateLabel, "CENTER", 0, -20)
  6.  
  7. local ft = f:CreateTexture()
  8. ft:SetAllPoints()
  9.  
  10. RMF = CreateFrame("Frame")
  11. RMF:RegisterEvent("MODIFIER_STATE_CHANGED")
  12. RMF:SetScript("OnEvent", function(self, event, ...)
  13.  
  14. local arg = {...}
  15.  
  16. if RotSwitch == nil then
  17.     ft:SetTexture("Interface\\AddOns\\pve\\Blp\\gray")
  18. end;
  19.  
  20. if arg[1] == "LSHIFT" and arg[2] == 1 then
  21. if RotSwitch == 1 then
  22.     RotSwitch = 2
  23.     ft:SetTexture("Interface\\AddOns\\pve\\Blp\\red")
  24. else
  25.     RotSwitch = 1
  26.     ft:SetTexture("Interface\\AddOns\\pve\\Blp\\green")
  27. end
  28. end;
  29.  
  30. if arg[1] == "RSHIFT" and arg[2] == 1 then
  31. if RotSwitch == 1 or RotSwitch == 2 then
  32.     RotSwitch = 3
  33.     ft:SetTexture("Interface\\AddOns\\pve\\Blp\\white")
  34. else
  35.     RotSwitch = 2
  36.     ft:SetTexture("Interface\\AddOns\\pve\\Blp\\red")
  37. end
  38. end;
  39.  
  40. end)
  41.  
  42. vrot = true end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement