Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.37 KB | None | 0 0
  1.         -- Skin Flyout
  2.         function Skin:SkinMCABFlyoutFrame(flyout, type, parent)
  3.             local point, _, _, _, _ = TukuiShiftBar:GetPoint()
  4.             flyout.top:SetTexture(nil)
  5.             flyout.middle:SetTexture(nil)
  6.             self:SkinFrame(flyout)
  7.             flyout:SetBackdropBorderColor(0,0,0,0)
  8.             flyout:SetBackdropColor(0,0,0,0)
  9.             -- Skin buttons
  10.             local last = nil
  11.             for _,button in ipairs(flyout.buttons) do
  12.                 self:SkinButton(button)
  13.                 if not InCombatLockdown() then
  14.                     button:SetSize(TukuiDB.petbuttonsize,TukuiDB.petbuttonsize)
  15.                     button:ClearAllPoints()
  16.                     button:SetPoint("BOTTOM",last,"TOP",0,config.borderWidth)
  17.                 end        
  18.                 if button:IsVisible() then last = button end
  19.                 button:SetBackdropBorderColor(parent:GetBackdropBorderColor())
  20.             end
  21.             flyout.buttons[1]:SetPoint("BOTTOM",flyout,"BOTTOM")
  22.             if type == "slot" then
  23.                 local tcoords = SLOT_EMPTY_TCOORDS[flyout.parent:GetID()]
  24.                 flyout.buttons[1].icon:SetTexCoord(tcoords.left,tcoords.right,tcoords.top,tcoords.bottom)
  25.             end
  26.             -- Skin Close button
  27.             local close = MultiCastFlyoutFrameCloseButton
  28.             self:SkinButton(close)
  29.            
  30.             close:GetHighlightTexture():SetTexture([[Interface\Buttons\ButtonHilight-Square]])
  31.             close:GetHighlightTexture():SetPoint("TOPLEFT",close,"TOPLEFT",config.borderWidth,-config.borderWidth)
  32.             close:GetHighlightTexture():SetPoint("BOTTOMRIGHT",close,"BOTTOMRIGHT",-config.borderWidth,config.borderWidth)
  33.             close:GetNormalTexture():SetTexture(nil)
  34.             close:ClearAllPoints()
  35.             if point == "BOTTOMLEFT" or point == "BOTTOMRIGHT" or point == "BOTTOM" then
  36.                 close:SetPoint("BOTTOMLEFT",last,"TOPLEFT",0,config.buttonSpacing)
  37.                 close:SetPoint("BOTTOMRIGHT",last,"TOPRIGHT",0,config.buttonSpacing)
  38.             else
  39.                 if last then
  40.                     close:SetWidth(last:GetWidth())
  41.                 end
  42.                 close:SetPoint("TOP",flyout,"BOTTOM",0,-config.buttonSpacing)      
  43.             end
  44.             close:SetHeight(config.buttonSpacing*2)
  45.             close:SetBackdropBorderColor(parent:GetBackdropBorderColor())
  46.             flyout:ClearAllPoints()
  47.             if point == "BOTTOMLEFT" or point == "BOTTOMRIGHT" or point == "BOTTOM" then
  48.                 flyout:SetPoint("BOTTOM",parent,"TOP",0,config.buttonSpacing)
  49.             else
  50.                 flyout:SetPoint("TOP",parent,"BOTTOM",0,-config.buttonSpacing)
  51.             end
  52.            
  53.             MultiCastFlyoutFrameOpenButton:Hide()
  54.         end
  55.         hooksecurefunc("MultiCastFlyoutFrame_ToggleFlyout",function(self, type, parent) skin:SkinMCABFlyoutFrame(self, type, parent) end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement