comparison Modules/ObjectiveTracker.lua @ 73:95ed343c3a42

- VeneerBuffTemplate and members
author Nenue
date Tue, 23 Aug 2016 16:15:09 -0400
parents d80db9a9b7e4
children
comparison
equal deleted inserted replaced
72:d80db9a9b7e4 73:95ed343c3a42
7 local plugin = CreateFrame('Frame', 'VeneerObjectives', UIParent) 7 local plugin = CreateFrame('Frame', 'VeneerObjectives', UIParent)
8 local vn, print = LibStub("LibKraken").register(VeneerController, plugin) 8 local vn, print = LibStub("LibKraken").register(VeneerController, plugin)
9 local ot 9 local ot
10 local otvn 10 local otvn
11 11
12 local ResetObjectiveTrackerAnchor = function() 12 local INSET_V = -20
13
14 local GetVeneer = function()
13 15
14 print('|cFFFF4400ObjectiveTracker_Initialize|r') 16 print('|cFFFF4400ObjectiveTracker_Initialize|r')
15 otvn = vn.GetVeneer(ot) 17 otvn = vn.GetVeneer(ot)
16 print(otvn:GetHeight()) 18 print(otvn:GetHeight())
17 19
19 for i = 1, #ot.MODULES do 21 for i = 1, #ot.MODULES do
20 print(i, ot.MODULES[i]) 22 print(i, ot.MODULES[i])
21 end 23 end
22 ot:ClearAllPoints() 24 ot:ClearAllPoints()
23 ot:SetPoint('TOPRIGHT', UIParent, 'TOPRIGHT', -5, -140) 25 ot:SetPoint('TOPRIGHT', UIParent, 'TOPRIGHT', -5, -140)
24 print(ot:GetHeight(), ot:GetWidth())
25 local width, height = ot:GetSize()
26 ot:SetSize(width, height)
27 26
28 print(ot:GetHeight(), ot:GetWidth())
29 --vn.GetVeneer(ot):SetAllPoints(ot) 27 --vn.GetVeneer(ot):SetAllPoints(ot)
30 end 28 end
31 29
32 local UpdateVeneer = function() 30 local UpdateVeneer = function()
33 if not ot.initialized or not otvn then 31 if not ot.initialized or not otvn then
34 return 32 return
35 end 33 end
36 34
37 35
38 36
39 print(ot:GetPoint(1),ot:GetPoint(2), ot:GetSize()) 37 ot:ClearAllPoints()
40 print(ot:GetTop(), ot:GetLeft()) 38 ot:SetPoint('TOPRIGHT', UIParent, 'TOPRIGHT', -5, -140)
41 print(ot:GetBottom(), ot:GetRight()) 39
42 print(otvn:GetTop(), otvn:GetLeft())
43 print(otvn:GetBottom(), otvn:GetRight())
44 otvn:Show()
45 end 40 end
46 41
47 local CreateVeneer = function() 42 local CreateVeneer = function()
48 ot = ObjectiveTrackerFrame 43 ot = ObjectiveTrackerFrame
49 hooksecurefunc('ObjectiveTracker_Initialize', ResetObjectiveTrackerAnchor) 44 hooksecurefunc('ObjectiveTracker_Initialize', GetVeneer)
50 hooksecurefunc('ObjectiveTracker_Update', UpdateVeneer) 45 hooksecurefunc('ObjectiveTracker_Update', UpdateVeneer)
51 end 46 end
52 47
53 plugin.init = function() 48 plugin.init = function()
54 if ObjectiveTrackerFrame then 49 if ObjectiveTrackerFrame then