WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   hook function from nTooltip (https://www.wowinterface.com/forums/showthread.php?t=50138)

evilbib 10-17-14 04:40 AM

hook function from nTooltip
 
Hi,

is there a way to access the function "ApplyTooltipStyle" from nTooltip?
nTooltip is part of Neav UI.

Here is the function
Code:

local function ApplyTooltipStyle(self)
    local bgsize, bsize
    if (self == ConsolidatedBuffsTooltip) then
        bgsize = 1
        bsize = 8
    elseif (self == FriendsTooltip) then
        FriendsTooltip:SetScale(1.1)

        bgsize = 1
        bsize = 9
    else
        bgsize = 3
        bsize = 12
    end

    local edgeTexture
    if (not IsAddOnLoaded('!Beautycase')) then
        edgeTexture = 'Interface\\Tooltips\\UI-Tooltip-Border'
    else
        edgeTexture = nil
    end

    self:SetBackdrop({
        bgFile = 'Interface\\Buttons\\WHITE8x8',    -- 'Interface\\Tooltips\\UI-Tooltip-Background',
        edgeFile = edgeTexture,
        edgeSize = 15,

        insets = {
            left = bgsize, right = bgsize, top = bgsize, bottom = bgsize
        }
    })

    self:HookScript('OnShow', function(self)
        self:SetBackdropColor(0, 0, 0, 0.7)
    end)

    if (IsAddOnLoaded('!Beautycase')) then
        self:CreateBeautyBorder(bsize)
    end
end



All times are GMT -6. The time now is 12:10 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI