comparison KeyButton.lua @ 76:6623b7f2c1ca v7.1.5-78-release

Added: - key assignment and unbinding for inactive talents Bug Fixes: - fixed spell access check for talents - fixed detection of Legion PvP talents - fixed unbind command not clearing assigned key text - fixed frame content not loading after combat Miscellaneous: - bindings are determined from the button's assignment list - increment profile version to remove deprecated talents list
author Nenue
date Mon, 23 Jan 2017 20:07:30 -0500
parents 9824d524a661
children d4c100b0fd01
comparison
equal deleted inserted replaced
75:e75a2fd448c0 76:6623b7f2c1ca
131 local cursorType = GetCursorInfo() 131 local cursorType = GetCursorInfo()
132 if click == 'LeftButton' then 132 if click == 'LeftButton' then
133 if cursorType then 133 if cursorType then
134 self:DropToSlot() 134 self:DropToSlot()
135 else 135 else
136 if self.command and self.isAvailable then 136 if self.command then
137 if IsShiftKeyDown() then 137 if IsShiftKeyDown() then
138 kb.db.stickyMode = true 138 kb.db.stickyMode = true
139 KeyBinderStickyMode:SetChecked(true) 139 KeyBinderStickyMode:SetChecked(true)
140 end 140 end
141 self:GetParent():ActivateSlot(self) 141 self:GetParent():ActivateSlot(self)
419 end 419 end
420 local talentName = self.actionName 420 local talentName = self.actionName
421 if self.actionType == 'macro' then 421 if self.actionType == 'macro' then
422 talentName = GetMacroSpell(self.actionID) 422 talentName = GetMacroSpell(self.actionID)
423 end 423 end
424 -- remove any matching talent data 424
425 if talentName and kb.currentProfile.talents[talentName] then
426 kb.currentProfile.talents[talentName] = nil
427 end
428 local droppedKeys = {} 425 local droppedKeys = {}
429 426
430 -- doing removal in second loop to avoid possible iterator shenanigans 427 -- doing removal in second loop to avoid possible iterator shenanigans
431 for k,v in pairs(kb.currentProfile.bindings) do 428 for k,v in pairs(kb.currentProfile.bindings) do
432 if v == self.command then 429 if v == self.command then
459 self.icon:SetTexture(nil) 456 self.icon:SetTexture(nil)
460 self.ignoreTexture:Hide() 457 self.ignoreTexture:Hide()
461 458
462 end 459 end
463 460
464 local DoMacroCheck = function(name, macroText, searchID, roughResult)
465
466 return matchID, matchName, matchBody, endOfSearch
467 end
468 --- Assigns the slot via table copy; any manipulations from this point are temporary and 461 --- Assigns the slot via table copy; any manipulations from this point are temporary and
469 function skb:SetSlot(slotInfo) 462 function skb:SetSlot(slotInfo)
470 print('slot info', self:GetID()) 463 print('slot info', self:GetID())
471 464
472 for k,v in pairs(slotInfo) do 465 for k,v in pairs(slotInfo) do