Mercurial > wow > buffalo2
view Modules/ObjectiveTracker.lua @ 80:bb6b532c5d2f
- added "world state" frame for zone-specific currencies and context-based artifact/experience progress
author | Nenue |
---|---|
date | Tue, 11 Oct 2016 08:03:41 -0400 |
parents | 95ed343c3a42 |
children |
line wrap: on
line source
-- Veneer -- ObjectiveTracker.lua -- Created: 8/16/2016 8:19 AM -- %file-revision% -- Fixes objective tracker positioning in relation to buff frame alterations local plugin = CreateFrame('Frame', 'VeneerObjectives', UIParent) local vn, print = LibStub("LibKraken").register(VeneerController, plugin) local ot local otvn local INSET_V = -20 local GetVeneer = function() print('|cFFFF4400ObjectiveTracker_Initialize|r') otvn = vn.GetVeneer(ot) print(otvn:GetHeight()) for i = 1, #ot.MODULES do print(i, ot.MODULES[i]) end ot:ClearAllPoints() ot:SetPoint('TOPRIGHT', UIParent, 'TOPRIGHT', -5, -140) --vn.GetVeneer(ot):SetAllPoints(ot) end local UpdateVeneer = function() if not ot.initialized or not otvn then return end ot:ClearAllPoints() ot:SetPoint('TOPRIGHT', UIParent, 'TOPRIGHT', -5, -140) end local CreateVeneer = function() ot = ObjectiveTrackerFrame hooksecurefunc('ObjectiveTracker_Initialize', GetVeneer) hooksecurefunc('ObjectiveTracker_Update', UpdateVeneer) end plugin.init = function() if ObjectiveTrackerFrame then print('tracker is already loaded') CreateVeneer() else plugin:RegisterEvent('ADDON_LOADED') plugin.ADDON_LOADED = function(self, addon) if addon == 'Blizzard_ObjectiveTracker' then print('responding to blizzard tracker loadin') CreateVeneer() end end end end