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 |
|---|---|---|
| jtbalogh | Jan 08, 2012 at 16:42 UTC | Create |