Mercurial > wow > buffalo2
comparison 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 |
comparison
equal
deleted
inserted
replaced
18:d1812fb10ae6 | 19:605e8f0e46db |
---|---|
45 } | 45 } |
46 } | 46 } |
47 | 47 |
48 local Scroller_OnShow = function() | 48 local Scroller_OnShow = function() |
49 Wrapper.watchMoneyReasons = 0; | 49 Wrapper.watchMoneyReasons = 0; |
50 mod.UpdateWrapper() | 50 --mod:Update() |
51 mod.SetEvents() | 51 --mod:OnInitialize() |
52 for i, region in ipairs(Wrapper.headerComplex) do | 52 for i, region in ipairs(Wrapper.headerComplex) do |
53 region:Show() | 53 region:Show() |
54 end | 54 end |
55 end | 55 end |
56 | 56 |
101 | 101 |
102 OnClick.QuestMapButton = function() | 102 OnClick.QuestMapButton = function() |
103 ToggleWorldMap() | 103 ToggleWorldMap() |
104 end | 104 end |
105 | 105 |
106 mod.InitializeWrapperWidgets = function() | 106 mod.InitializeWidgets = function() |
107 --- tracker scroll | 107 --- tracker scroll |
108 Scroller:SetScript('OnMouseWheel', Scroller_OnMouseWheel) | 108 Scroller:SetScript('OnMouseWheel', Scroller_OnMouseWheel) |
109 Scroller:SetScript('OnShow', Scroller_OnShow) | 109 Scroller:SetScript('OnShow', Scroller_OnShow) |
110 Scroller:SetScript('OnHide', Scroller_OnHide) | 110 Scroller:SetScript('OnHide', Scroller_OnHide) |
111 for name, swatch in pairs(panelButtons) do | 111 for name, swatch in pairs(panelButtons) do |
309 --- WidgetTemplate 'OnShow' | 309 --- WidgetTemplate 'OnShow' |
310 mod.InitializeWidget = setmetatable({}, { | 310 mod.InitializeWidget = setmetatable({}, { |
311 __call = function(t, frame) | 311 __call = function(t, frame) |
312 -- todo: config pull | 312 -- todo: config pull |
313 | 313 |
314 frame:SetWidth(mod.Conf.Wrapper.WrapperWidth - mod.Conf.Style.Format.status.Indent * 2) | 314 frame:SetWidth(mod.Conf.Wrapper.Width - mod.Conf.Style.Format.status.Indent * 2) |
315 frame:SetScript('OnEvent', mod.UpdateWidget[frame.widgetType]) | 315 frame:SetScript('OnEvent', mod.UpdateWidget[frame.widgetType]) |
316 if frame.info.isCurrency then | 316 if frame.info.isCurrency then |
317 frame:RegisterEvent('CHAT_MSG_CURRENCY') | 317 frame:RegisterEvent('CHAT_MSG_CURRENCY') |
318 frame:RegisterEvent('CURRENCY_LIST_UPDATE') | 318 frame:RegisterEvent('CURRENCY_LIST_UPDATE') |
319 end | 319 end |