annotate Modules/ObjectiveTracker.lua @ 86:48182978d1c6

- revert count info to non-hook method; something spam fires Hide making stacking debuffs unintelligible - implement config variables for position and anchoring of buff sub-regions
author Nenue
date Tue, 18 Oct 2016 19:53:24 -0400
parents 95ed343c3a42
children
rev   line source
Nenue@62 1 -- Veneer
Nenue@62 2 -- ObjectiveTracker.lua
Nenue@62 3 -- Created: 8/16/2016 8:19 AM
Nenue@62 4 -- %file-revision%
Nenue@62 5 -- Fixes objective tracker positioning in relation to buff frame alterations
Nenue@62 6
Nenue@62 7 local plugin = CreateFrame('Frame', 'VeneerObjectives', UIParent)
Nenue@71 8 local vn, print = LibStub("LibKraken").register(VeneerController, plugin)
Nenue@71 9 local ot
Nenue@71 10 local otvn
Nenue@71 11
Nenue@73 12 local INSET_V = -20
Nenue@73 13
Nenue@73 14 local GetVeneer = function()
Nenue@71 15
Nenue@71 16 print('|cFFFF4400ObjectiveTracker_Initialize|r')
Nenue@72 17 otvn = vn.GetVeneer(ot)
Nenue@71 18 print(otvn:GetHeight())
Nenue@71 19
Nenue@71 20
Nenue@71 21 for i = 1, #ot.MODULES do
Nenue@71 22 print(i, ot.MODULES[i])
Nenue@71 23 end
Nenue@72 24 ot:ClearAllPoints()
Nenue@72 25 ot:SetPoint('TOPRIGHT', UIParent, 'TOPRIGHT', -5, -140)
Nenue@72 26
Nenue@72 27 --vn.GetVeneer(ot):SetAllPoints(ot)
Nenue@71 28 end
Nenue@71 29
Nenue@71 30 local UpdateVeneer = function()
Nenue@72 31 if not ot.initialized or not otvn then
Nenue@71 32 return
Nenue@71 33 end
Nenue@71 34
Nenue@72 35
Nenue@72 36
Nenue@73 37 ot:ClearAllPoints()
Nenue@73 38 ot:SetPoint('TOPRIGHT', UIParent, 'TOPRIGHT', -5, -140)
Nenue@73 39
Nenue@71 40 end
Nenue@71 41
Nenue@71 42 local CreateVeneer = function()
Nenue@71 43 ot = ObjectiveTrackerFrame
Nenue@73 44 hooksecurefunc('ObjectiveTracker_Initialize', GetVeneer)
Nenue@71 45 hooksecurefunc('ObjectiveTracker_Update', UpdateVeneer)
Nenue@71 46 end
Nenue@71 47
Nenue@71 48 plugin.init = function()
Nenue@71 49 if ObjectiveTrackerFrame then
Nenue@71 50 print('tracker is already loaded')
Nenue@71 51 CreateVeneer()
Nenue@71 52 else
Nenue@71 53 plugin:RegisterEvent('ADDON_LOADED')
Nenue@71 54 plugin.ADDON_LOADED = function(self, addon)
Nenue@71 55 if addon == 'Blizzard_ObjectiveTracker' then
Nenue@71 56 print('responding to blizzard tracker loadin')
Nenue@71 57 CreateVeneer()
Nenue@71 58 end
Nenue@71 59 end
Nenue@71 60 end
Nenue@71 61 end
Nenue@71 62