PageRenderTime 30ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/Tukui/modules/skins/lfr.lua

http://github.com/Asphyxia/Tukui
Lua | 70 lines | 54 code | 14 blank | 2 comment | 7 complexity | 3b4bb0678f3274a7f82f8ac8b10c3969 MD5 | raw file
  1. local T, C, L = unpack(select(2, ...))
  2. local function LoadSkin()
  3. local buttons = {
  4. "LFRQueueFrameFindGroupButton",
  5. "LFRQueueFrameAcceptCommentButton",
  6. "LFRBrowseFrameSendMessageButton",
  7. "LFRBrowseFrameInviteButton",
  8. "LFRBrowseFrameRefreshButton",
  9. }
  10. LFRParentFrame:StripTextures()
  11. LFRParentFrame:SetTemplate("Transparent")
  12. LFRQueueFrame:StripTextures()
  13. LFRBrowseFrame:StripTextures()
  14. for i=1, #buttons do
  15. T.SkinButton(_G[buttons[i]])
  16. end
  17. --Close button doesn't have a fucking name, extreme hackage
  18. for i=1, LFRParentFrame:GetNumChildren() do
  19. local child = select(i, LFRParentFrame:GetChildren())
  20. if child.GetPushedTexture and child:GetPushedTexture() and not child:GetName() then
  21. T.SkinCloseButton(child)
  22. end
  23. end
  24. T.SkinTab(LFRParentFrameTab1)
  25. T.SkinTab(LFRParentFrameTab2)
  26. T.SkinDropDownBox(LFRBrowseFrameRaidDropDown)
  27. for i=1, 20 do
  28. local button = _G["LFRQueueFrameSpecificListButton"..i.."ExpandOrCollapseButton"]
  29. if button then
  30. button:HookScript("OnClick", function()
  31. T.SkinCloseButton(button)
  32. end)
  33. T.SkinCloseButton(button)
  34. end
  35. end
  36. LFRQueueFrameCommentTextButton:CreateBackdrop("Transparent")
  37. LFRQueueFrameCommentTextButton:Height(35)
  38. for i=1, 7 do
  39. local button = "LFRBrowseFrameColumnHeader"..i
  40. _G[button.."Left"]:Kill()
  41. _G[button.."Middle"]:Kill()
  42. _G[button.."Right"]:Kill()
  43. end
  44. for i=1, NUM_LFR_CHOICE_BUTTONS do
  45. local button = _G["LFRQueueFrameSpecificListButton"..i]
  46. T.SkinCheckBox(button.enableButton)
  47. end
  48. --DPS, Healer, Tank check button's don't have a name, use it's parent as a referance.
  49. T.SkinCheckBox(LFRQueueFrameRoleButtonTank:GetChildren())
  50. T.SkinCheckBox(LFRQueueFrameRoleButtonHealer:GetChildren())
  51. T.SkinCheckBox(LFRQueueFrameRoleButtonDPS:GetChildren())
  52. LFRQueueFrameRoleButtonTank:GetChildren():SetFrameLevel(LFRQueueFrameRoleButtonTank:GetChildren():GetFrameLevel() + 2)
  53. LFRQueueFrameRoleButtonHealer:GetChildren():SetFrameLevel(LFRQueueFrameRoleButtonHealer:GetChildren():GetFrameLevel() + 2)
  54. LFRQueueFrameRoleButtonDPS:GetChildren():SetFrameLevel(LFRQueueFrameRoleButtonDPS:GetChildren():GetFrameLevel() + 2)
  55. end
  56. tinsert(T.SkinFuncs["Tukui"], LoadSkin)