Цитата Сообщение от Сарыч Посмотреть сообщение

2)Так же есть скрипт на скрытие боковых панелей и при наведении на них курсором они появляются

Скрытый текст

Код:
 MultiBarRight:SetAlpha(0)
MultiBarRight:EnableMouse(true)
MultiBarRight:SetScript("OnEnter",function(self)MultiBarRight:SetAlpha(1);MultiBarLeft:SetAlpha(1)end)
MultiBarRight:SetScript("OnLeave",function(self)MultiBarRight:SetAlpha(0)MultiBarLeft:SetAlpha(0)end)
MultiBarRight:SetFrameLevel(0)

for i =1,12 do
    _G["MultiBarRightButton"..i]:HookScript("OnEnter",function(self)MultiBarRight:SetAlpha(1);MultiBarLeft:SetAlpha(1)end)
    _G["MultiBarRightButton"..i]:HookScript("OnLeave",function(self)MultiBarRight:SetAlpha(0);MultiBarLeft:SetAlpha(0)end)
end;

MultiBarLeft:SetAlpha(0)
MultiBarLeft:EnableMouse(true)
MultiBarLeft:SetScript("OnEnter",function(self)MultiBarLeft:SetAlpha(1);MultiBarRight:SetAlpha(1)end)
MultiBarLeft:SetScript("OnLeave",function(self)MultiBarLeft:SetAlpha(0);MultiBarRight:SetAlpha(0)end)
MultiBarLeft:SetFrameLevel(0)

for i =1,12 do
    _G["MultiBarLeftButton"..i]:HookScript("OnEnter",function(self)MultiBarRight:SetAlpha(1);MultiBarLeft:SetAlpha(1)end)
    _G["MultiBarLeftButton"..i]:HookScript("OnLeave",function(self)MultiBarRight:SetAlpha(0);MultiBarLeft:SetAlpha(0)end)
end;
[свернуть]


Как добавить таймер исчезновения ? как в Bartender 4 (допустим 0,6)

Ну первое что пришло в голову
PHP код:
local Core CreateFrame("Frame");
local _G _G;
function 
Core:OnLeave()
    
local Update 0;
    
self:SetScript("OnUpdate", function(selfelapsed)
        
Update Update elapsed;
        if 
Update >= 0.6 then
            self
:SetScript("OnUpdate"nil);
            
MultiBarLeft:SetAlpha(0);
            
MultiBarRight:SetAlpha(0)
        
end;
    
end);
end;
function 
Core:OnEnter()
    
self:SetScript("OnUpdate"nil); 
    
MultiBarRight:SetAlpha(1); 
    
MultiBarLeft:SetAlpha(1);
end;


local function MBarAlpha(frameName)
    
local frame _G[frameName];
    
frame:SetAlpha(0);
    
frame:EnableMouse(true);
    
frame:SetScript("OnEnter",function(selfCore:OnEnter(); end);
    
frame:SetScript("OnLeave",function(selfCore:OnLeave(); end);
    
frame:SetFrameLevel(0);
    
    for 
112 do
        
_G[frameName.."Button"..i]:HookScript("OnEnter",function(selfCore:OnEnter(); end);
        
_G[frameName.."Button"..i]:HookScript("OnLeave",function(selfCore:OnLeave(); end);
    
end;    
end;

MBarAlpha("MultiBarRight");
MBarAlpha("MultiBarLeft");