/Tukui/modules/skins/lfd.lua
Lua | 119 lines | 106 code | 13 blank | 0 comment | 12 complexity | a252a0315fb06edb015fb7ffcca3bf17 MD5 | raw file
1local T, C, L = unpack(select(2, ...)) 2 3local function LoadSkin() 4 local StripAllTextures = { 5 "LFDParentFrame", 6 "LFDQueueFrame", 7 "LFDQueueFrameSpecific", 8 "LFDQueueFrameRandom", 9 "LFDQueueFrameRandomScrollFrame", 10 "LFDQueueFrameCapBar", 11 "LFDDungeonReadyDialog", 12 } 13 14 local KillTextures = { 15 "LFDQueueFrameBackground", 16 "LFDParentFrameInset", 17 "LFDParentFrameEyeFrame", 18 "LFDQueueFrameRoleButtonTankBackground", 19 "LFDQueueFrameRoleButtonHealerBackground", 20 "LFDQueueFrameRoleButtonDPSBackground", 21 "LFDDungeonReadyDialogBackground", 22 } 23 local buttons = { 24 "LFDQueueFrameFindGroupButton", 25 "LFDQueueFrameCancelButton", 26 "LFDQueueFramePartyBackfillBackfillButton", 27 "LFDQueueFramePartyBackfillNoBackfillButton", 28 } 29 30 local checkButtons = { 31 "LFDQueueFrameRoleButtonTank", 32 "LFDQueueFrameRoleButtonHealer", 33 "LFDQueueFrameRoleButtonDPS", 34 "LFDQueueFrameRoleButtonLeader", 35 } 36 37 for _, object in pairs(checkButtons) do 38 _G[object]:GetChildren():SetFrameLevel(_G[object]:GetChildren():GetFrameLevel() + 2) 39 T.SkinCheckBox(_G[object]:GetChildren()) 40 end 41 42 for _, object in pairs(StripAllTextures) do 43 _G[object]:StripTextures() 44 end 45 46 for _, texture in pairs(KillTextures) do 47 _G[texture]:Kill() 48 end 49 50 for i = 1, #buttons do 51 _G[buttons[i]]:StripTextures() 52 T.SkinButton(_G[buttons[i]]) 53 end 54 55 for i= 1,15 do 56 T.SkinCheckBox(_G["LFDQueueFrameSpecificListButton"..i.."EnableButton"]) 57 end 58 59 LFDQueueFrameCapBar:SetPoint("LEFT", 40, 0) 60 LFDQueueFrameRandom:HookScript("OnShow", function() 61 for i=1, LFD_MAX_REWARDS do 62 local button = _G["LFDQueueFrameRandomScrollFrameChildFrameItem"..i] 63 local icon = _G["LFDQueueFrameRandomScrollFrameChildFrameItem"..i.."IconTexture"] 64 local count = _G["LFDQueueFrameRandomScrollFrameChildFrameItem"..i.."Count"] 65 local role1 = _G["LFDQueueFrameRandomScrollFrameChildFrameItem"..i.."RoleIcon1"] 66 local role2 = _G["LFDQueueFrameRandomScrollFrameChildFrameItem"..i.."RoleIcon2"] 67 local role3 = _G["LFDQueueFrameRandomScrollFrameChildFrameItem"..i.."RoleIcon3"] 68 69 if button then 70 button:StripTextures() 71 icon:SetTexCoord(.08, .92, .08, .92) 72 icon:Point("TOPLEFT", 2, -2) 73 icon:SetDrawLayer("OVERLAY") 74 count:SetDrawLayer("OVERLAY") 75 if not button.backdrop then 76 button:CreateBackdrop("Transparent") 77 button.backdrop:Point("TOPLEFT", icon, "TOPLEFT", -2, 2) 78 button.backdrop:Point("BOTTOMRIGHT", icon, "BOTTOMRIGHT", 2, -2) 79 icon:SetParent(button.backdrop) 80 icon.SetPoint = T.dummy 81 82 if count then 83 count:SetParent(button.backdrop) 84 end 85 if role1 then 86 role1:SetParent(button.backdrop) 87 end 88 if role2 then 89 role2:SetParent(button.backdrop) 90 end 91 if role3 then 92 role3:SetParent(button.backdrop) 93 end 94 end 95 end 96 end 97 end) 98 99 LFDDungeonReadyDialog:SetTemplate("Transparent") 100 LFDDungeonReadyDialog:CreateShadow("Transparent") 101 LFDQueueFrameSpecificListScrollFrame:StripTextures() 102 LFDQueueFrameSpecificListScrollFrame:Height(LFDQueueFrameSpecificListScrollFrame:GetHeight() - 8) 103 LFDParentFrame:CreateBackdrop("Transparent") 104 LFDParentFrame.backdrop:Point( "TOPLEFT", LFDParentFrame, "TOPLEFT") 105 LFDParentFrame.backdrop:Point( "BOTTOMRIGHT", LFDParentFrame, "BOTTOMRIGHT") 106 T.SkinCloseButton(LFDParentFrameCloseButton,LFDParentFrame) 107 T.SkinCloseButton(LFDDungeonReadyDialogCloseButton,LFDDungeonReadyDialog) 108 T.SkinDropDownBox(LFDQueueFrameTypeDropDown, 300) 109 LFDQueueFrameTypeDropDown:Point("RIGHT",-10,0) 110 LFDQueueFrameCapBar:CreateBackdrop("Transparent") 111 LFDQueueFrameCapBar.backdrop:Point( "TOPLEFT", LFDQueueFrameCapBar, "TOPLEFT", 1, -1) 112 LFDQueueFrameCapBar.backdrop:Point( "BOTTOMRIGHT", LFDQueueFrameCapBar, "BOTTOMRIGHT", -1, 1 ) 113 LFDQueueFrameCapBarProgress:SetTexture(C["media"].normTex) 114 LFDQueueFrameCapBarCap1:SetTexture(C["media"].normTex) 115 LFDQueueFrameCapBarCap2:SetTexture(C["media"].normTex) 116 T.SkinScrollBar(LFDQueueFrameSpecificListScrollFrameScrollBar) 117end 118 119tinsert(T.SkinFuncs["Tukui"], LoadSkin)