Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Skin Flyout
- function Skin:SkinMCABFlyoutFrame(flyout, type, parent)
- local point, _, _, _, _ = TukuiShiftBar:GetPoint()
- flyout.top:SetTexture(nil)
- flyout.middle:SetTexture(nil)
- self:SkinFrame(flyout)
- flyout:SetBackdropBorderColor(0,0,0,0)
- flyout:SetBackdropColor(0,0,0,0)
- -- Skin buttons
- local last = nil
- for _,button in ipairs(flyout.buttons) do
- self:SkinButton(button)
- if not InCombatLockdown() then
- button:SetSize(TukuiDB.petbuttonsize,TukuiDB.petbuttonsize)
- button:ClearAllPoints()
- button:SetPoint("BOTTOM",last,"TOP",0,config.borderWidth)
- end
- if button:IsVisible() then last = button end
- button:SetBackdropBorderColor(parent:GetBackdropBorderColor())
- end
- flyout.buttons[1]:SetPoint("BOTTOM",flyout,"BOTTOM")
- if type == "slot" then
- local tcoords = SLOT_EMPTY_TCOORDS[flyout.parent:GetID()]
- flyout.buttons[1].icon:SetTexCoord(tcoords.left,tcoords.right,tcoords.top,tcoords.bottom)
- end
- -- Skin Close button
- local close = MultiCastFlyoutFrameCloseButton
- self:SkinButton(close)
- close:GetHighlightTexture():SetTexture([[Interface\Buttons\ButtonHilight-Square]])
- close:GetHighlightTexture():SetPoint("TOPLEFT",close,"TOPLEFT",config.borderWidth,-config.borderWidth)
- close:GetHighlightTexture():SetPoint("BOTTOMRIGHT",close,"BOTTOMRIGHT",-config.borderWidth,config.borderWidth)
- close:GetNormalTexture():SetTexture(nil)
- close:ClearAllPoints()
- if point == "BOTTOMLEFT" or point == "BOTTOMRIGHT" or point == "BOTTOM" then
- close:SetPoint("BOTTOMLEFT",last,"TOPLEFT",0,config.buttonSpacing)
- close:SetPoint("BOTTOMRIGHT",last,"TOPRIGHT",0,config.buttonSpacing)
- else
- if last then
- close:SetWidth(last:GetWidth())
- end
- close:SetPoint("TOP",flyout,"BOTTOM",0,-config.buttonSpacing)
- end
- close:SetHeight(config.buttonSpacing*2)
- close:SetBackdropBorderColor(parent:GetBackdropBorderColor())
- flyout:ClearAllPoints()
- if point == "BOTTOMLEFT" or point == "BOTTOMRIGHT" or point == "BOTTOM" then
- flyout:SetPoint("BOTTOM",parent,"TOP",0,config.buttonSpacing)
- else
- flyout:SetPoint("TOP",parent,"BOTTOM",0,-config.buttonSpacing)
- end
- MultiCastFlyoutFrameOpenButton:Hide()
- end
- hooksecurefunc("MultiCastFlyoutFrame_ToggleFlyout",function(self, type, parent) skin:SkinMCABFlyoutFrame(self, type, parent) end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement