Mercurial > wow > skeletonkey
diff ActionTemplates.lua @ 75:e75a2fd448c0
- 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
- hard refresh after PLAYER_SPECIALIZATION_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 | Mon, 23 Jan 2017 18:59:02 -0500 |
parents | 9824d524a661 |
children | 6623b7f2c1ca |
line wrap: on
line diff
--- a/ActionTemplates.lua Sat Jan 14 02:29:33 2017 -0500 +++ b/ActionTemplates.lua Mon Jan 23 18:59:02 2017 -0500 @@ -99,7 +99,7 @@ end atype['item'] = function(id, name) - return CLICK_KEYBINDER_KEY, tostring(name), id, SkeletonKeyKey + return CLICK_KEYBINDER_KEY, tostring(name), tostring(name), SkeletonKeyKey end @@ -218,8 +218,7 @@ local specialButtonType if actionType == 'spell' then cprint(GetSpellInfo(actionID)) - cprint(GetSpellInfo(name)) - if GetSpellInfo(name) then + if GetSpellInfo(actionID) then isAvailable = true end local dynamicInfo = kb.DynamicSpells[name] @@ -231,8 +230,11 @@ configTable[k] = v end end + elseif actionType == 'item' then + actionID = configTable.actionName + isAvailable = true + else - else if actionType ~= 'macro' then actionPrefix = '*macrotext-' end @@ -374,11 +376,11 @@ configTable.assignedKeys = talent.assignedKeys end if not configTable.assignedKeys then - configTable.assignedKeys = {GetBindingKey(configTable.command) } + configTable.assignedKeys = {GetBindingKey(configTable.command)} end - if configTable.dynamicType == 'talent' then - --kb:print(table.concat(configTable.assignedKeys, ', ') .. ' bound to '.. configTable.actionName) - end + --if configTable.dynamicType == 'talent' then + -- kb:print(table.concat(configTable.assignedKeys, ', ') .. ' bound to '.. configTable.actionName) + --end for _, key in pairs(configTable.assignedKeys) do SetBinding(key, configTable.command) @@ -411,6 +413,7 @@ SaveBindings(GetCurrentBindingSet()) + end end