MBB

14 - Could the minimap buttons be checked by the addon only when logging in

Bug: Could the minimap buttons be checked by the addon only when logging in? Currently, all buttons are updated every 3 seconds which seems like a lot. Maybe add,

MBB_CheckTime = 0;
MBB_CheckTimeOnce = nil
function MBB_OnUpdate(elapsed)
    if( not MBB_CheckTimeOnce ) then   
        MBB_CheckTime = MBB_CheckTime + elapsed;  
    end  
    if( MBB_CheckTime >= 5 and not MBB_CheckTimeOnce ) then   
        MBB_CheckTime = 0;         
        MBB_CheckTimeOnce = 1 -- run once
        local children = {Minimap:GetChildren()}; 
        for _, child in ipairs(children) do 
            if( child:HasScript("OnClick") and not child.oshow and child:GetName() and not MBB_IsKnownButton(child:GetName(), 3) ) then 
                MBB_PrepareButton(child:GetName()); 
                if( not MBB_IsInArray(MBB_Exclude, child:GetName()) ) then 
                    MBB_AddButton(child:GetName()); 
                    MBB_SetPositions(); 
                end 
            end
        end
    end
User When Change
karlsnyder Sep 14, 2012 at 13:22 UTC Changed assigned to from Pericles to karlsnyder
jtbalogh Jan 08, 2012 at 16:42 UTC Create

You must login to post a comment. Don't have an account? Register to get one!

Facts

Last updated
Sep 14, 2012
Reported
Jan 08, 2012
Status
New - Issue has not had initial review yet.
Type
Defect - A shortcoming, fault, or imperfection
Priority
Medium - Normal priority.
Votes
0

Reported by

Possible assignees