comparison SkeletonKey.lua @ 72:c48913c5924c

- Dynamic bindings properly update between talent choices, and the hotkey text is also correctly reflected.
author Nenue
date Sat, 07 Jan 2017 12:47:41 -0500
parents 131d9190db6b
children 9824d524a661
comparison
equal deleted inserted replaced
71:ca3118127e5e 72:c48913c5924c
6 -- Created: 6/16/2016 3:47 AM 6 -- Created: 6/16/2016 3:47 AM
7 -------------------------------------------- 7 --------------------------------------------
8 -- Header script 8 -- Header script
9 9
10 local addonName, kb = ... 10 local addonName, kb = ...
11 local print = DEVIAN_WORKSPACE and function(...) print('SK',...) end or nop 11 local print = DEVIAN_WORKSPACE and function(...) _G.print('SK',...) end or nop
12 local cprint = DEVIAN_WORKSPACE and function(...) _G.print('Cfg',...) end or nop
12 SkeletonKeyMixin = { 13 SkeletonKeyMixin = {
13 scrollCache = {}, 14 scrollCache = {},
14 tabButtons = {}, 15 tabButtons = {},
15 keyButtons = {}, 16 keyButtons = {},
16 panelButtons = {}, 17 panelButtons = {},
67 kb.configHeaders = {} 68 kb.configHeaders = {}
68 kb.loadedProfiles = {} 69 kb.loadedProfiles = {}
69 kb.orderedProfiles = {} 70 kb.orderedProfiles = {}
70 kb.buttons = {} 71 kb.buttons = {}
71 kb.macros = {} 72 kb.macros = {}
72 kb.bindings = {} 73 kb.bindings = setmetatable({}, {__newindex = function(t,k,v) rawset(t,k,v) cprint('adding', k, v) end})
73 kb.petFrames = {} -- pet data is slightly delayed, their buttons are indexed here so they can be refreshed 74 kb.petFrames = {} -- pet data is slightly delayed, their buttons are indexed here so they can be refreshed
74 kb.talentFrames = {} 75 kb.talentFrames = {}
75 kb.professionFrames = {} 76 kb.professionFrames = {}
76 77
77 -- these are sent to plugin 78 -- these are sent to plugin
314 function SkeletonKeyMixin:OnLoad() 315 function SkeletonKeyMixin:OnLoad()
315 kb.frame = self 316 kb.frame = self
316 print('|cFF0088FF'..self:GetName()..':OnLoad()') 317 print('|cFF0088FF'..self:GetName()..':OnLoad()')
317 318
318 self.CloseButton:SetScript('OnClick', CloseButton_OnClick) 319 self.CloseButton:SetScript('OnClick', CloseButton_OnClick)
320 self:RegisterEvent('PLAYER_LOGIN')
319 self:RegisterEvent('PLAYER_ENTERING_WORLD') 321 self:RegisterEvent('PLAYER_ENTERING_WORLD')
320 self:RegisterEvent('ADDON_LOADED') 322 self:RegisterEvent('ADDON_LOADED')
321 self:EnableKeyboard(false) 323 self:EnableKeyboard(false)
322 324
323 self.zoomScale = self:GetScale() 325 self.zoomScale = self:GetScale()