Nenue@62: -- Veneer Nenue@62: -- ObjectiveTracker.lua Nenue@62: -- Created: 8/16/2016 8:19 AM Nenue@62: -- %file-revision% Nenue@62: -- Fixes objective tracker positioning in relation to buff frame alterations Nenue@62: Nenue@62: local plugin = CreateFrame('Frame', 'VeneerObjectives', UIParent) Nenue@71: local vn, print = LibStub("LibKraken").register(VeneerController, plugin) Nenue@71: local ot Nenue@71: local otvn Nenue@71: Nenue@71: local ResetObjectiveTrackerAnchor = function() Nenue@71: Nenue@71: print('|cFFFF4400ObjectiveTracker_Initialize|r') Nenue@71: otvn = vn.GetVeneer(ot.BlocksFrame) Nenue@71: print(otvn:GetHeight()) Nenue@71: vn:print(ot:GetHeight(), ot:GetWidth()) Nenue@71: Nenue@71: Nenue@71: for i = 1, #ot.MODULES do Nenue@71: print(i, ot.MODULES[i]) Nenue@71: end Nenue@71: end Nenue@71: Nenue@71: local UpdateVeneer = function() Nenue@71: if not ot.initialized then Nenue@71: return Nenue@71: end Nenue@71: Nenue@71: ot:ClearAllPoints() Nenue@71: ot:SetPoint('TOPRIGHT', UIParent, 'TOPRIGHT', -5, -140) Nenue@71: end Nenue@71: Nenue@71: local CreateVeneer = function() Nenue@71: ot = ObjectiveTrackerFrame Nenue@71: hooksecurefunc('ObjectiveTracker_Initialize', ResetObjectiveTrackerAnchor) Nenue@71: hooksecurefunc('ObjectiveTracker_Update', UpdateVeneer) Nenue@71: end Nenue@71: Nenue@71: plugin.init = function() Nenue@71: if ObjectiveTrackerFrame then Nenue@71: print('tracker is already loaded') Nenue@71: CreateVeneer() Nenue@71: else Nenue@71: plugin:RegisterEvent('ADDON_LOADED') Nenue@71: plugin.ADDON_LOADED = function(self, addon) Nenue@71: if addon == 'Blizzard_ObjectiveTracker' then Nenue@71: print('responding to blizzard tracker loadin') Nenue@71: CreateVeneer() Nenue@71: end Nenue@71: end Nenue@71: end Nenue@71: end Nenue@71: