comparison BindingsFrame.lua @ 74:9824d524a661

- binding slot mixin: - store key binding definitions under their slot's data table - apply action button attributes when a slot is assigned - obtain correct macro body text when a macro is slotted - fix algorithm for resolving renamed macro indices - move spell detail lookup code out of mixin script - event chains: - initialize addon from PLAYER_LOGIN - reload keybinds from PLAYER_SPECIALIZATION_CHANGED, after spec profile is resolved - refresh interface content from SPELLS_CHANGED - hotkey text: - restore communication and detection of key binding updates and reflect them accordingly - properly respond to dynamic bindings that result from talent updates
author Nenue
date Sat, 14 Jan 2017 02:29:33 -0500
parents c48913c5924c
children 6623b7f2c1ca
comparison
equal deleted inserted replaced
73:68365bda5ab5 74:9824d524a661
15 [[Interface\UI-TutorialFrame-QuestGiver\UI-TutorialFrame-QuestGray]] 15 [[Interface\UI-TutorialFrame-QuestGiver\UI-TutorialFrame-QuestGray]]
16 --]=] 16 --]=]
17 17
18 SkeletonKeyButtonMixin = {} 18 SkeletonKeyButtonMixin = {}
19 local _, kb = ... 19 local _, kb = ...
20 local print = (DEVIAN_PNAME == 'SkeletonKey') and function(...) _G.print('SK', ...) end or nop 20 local print = (DEVIAN_PNAME == 'SkeletonKey') and function(...) _G.print('SKUI', ...) end or nop
21 local gprint = (DEVIAN_PNAME == 'SkeletonKey') and function(...) _G.print('SK', ...) end or nop
21 local L = kb.L 22 local L = kb.L
22 local BINDS_PER_ROW = 2 23 local BINDS_PER_ROW = 2
23 local BINDING_TYPE_SPECIALIZATION = 3 24 local BINDING_TYPE_SPECIALIZATION = 3
24 local BINDING_TYPE_CHARACTER = 2 25 local BINDING_TYPE_CHARACTER = 2
25 local BINDING_TYPE_GLOBAL = 1 26 local BINDING_TYPE_GLOBAL = 1
247 248
248 249
249 250
250 --- push current information into living UI 251 --- push current information into living UI
251 function SkeletonKeyMixin:Update(force) 252 function SkeletonKeyMixin:Update(force)
252 print('|cFFFF8800'..self:GetName()..':Update()|r', InCombatLockdown() and 'combat', self:IsShown()) 253 gprint('|cFFFF8800'..self:GetName()..':Update()|r', InCombatLockdown() and 'combat', self:IsShown())
253 for index, frame in ipairs(self.Plugins) do 254 for index, frame in ipairs(self.Plugins) do
254 if frame.Update then 255 if frame.Update then
255 frame:Update(force) 256 frame:Update(force)
256 end 257 end
257 end 258 end
349 kb.currentProfile = selectedProfile 350 kb.currentProfile = selectedProfile
350 kb.db.bindMode = tabID 351 kb.db.bindMode = tabID
351 else 352 else
352 tabID = BINDING_TYPE_GLOBAL 353 tabID = BINDING_TYPE_GLOBAL
353 end 354 end
355 print(selectedProfile)
354 scrollOffset = scrollOffset or 0 356 scrollOffset = scrollOffset or 0
355 357
356 local leftSlot, upSlot 358 local leftSlot, upSlot
357 local buttonTable = self.buttons or {} 359 local buttonTable = self.buttons or {}
358 for index = 1, NUM_KEY_SLOTS do 360 for index = 1, NUM_KEY_SLOTS do