diff ObjectiveWidgets.lua @ 19:605e8f0e46db

ObjectiveCore / Style / Events / Frame - polishing the execution path for better performance - make use of the Blizzard_ObjectiveTracker bitfield values to ensure compatibility in possible secure hooks - avoid full updates when possible (using said bitfield values to indicate targeted sections) - extreme streamlining of event handling layout: specific reason updates are invoked from API hooks; broader updates are invoked by when the event listener catches something vague like 'QUEST_LOG_UPDATE'
author Nenue
date Wed, 06 Apr 2016 07:38:35 -0400
parents 880828018bf4
children d5ee940de273
line wrap: on
line diff
--- a/ObjectiveWidgets.lua	Tue Apr 05 02:38:01 2016 -0400
+++ b/ObjectiveWidgets.lua	Wed Apr 06 07:38:35 2016 -0400
@@ -47,8 +47,8 @@
 
 local Scroller_OnShow = function()
   Wrapper.watchMoneyReasons = 0;
-  mod.UpdateWrapper()
-  mod.SetEvents()
+  --mod:Update()
+  --mod:OnInitialize()
   for i, region in ipairs(Wrapper.headerComplex) do
     region:Show()
   end
@@ -103,7 +103,7 @@
   ToggleWorldMap()
 end
 
-mod.InitializeWrapperWidgets = function()
+mod.InitializeWidgets = function()
   --- tracker scroll
   Scroller:SetScript('OnMouseWheel', Scroller_OnMouseWheel)
   Scroller:SetScript('OnShow', Scroller_OnShow)
@@ -311,7 +311,7 @@
   __call = function(t, frame)
     -- todo: config pull
 
-    frame:SetWidth(mod.Conf.Wrapper.WrapperWidth - mod.Conf.Style.Format.status.Indent * 2)
+    frame:SetWidth(mod.Conf.Wrapper.Width - mod.Conf.Style.Format.status.Indent * 2)
     frame:SetScript('OnEvent', mod.UpdateWidget[frame.widgetType])
     if frame.info.isCurrency then
       frame:RegisterEvent('CHAT_MSG_CURRENCY')