# HG changeset patch
# User Nenue
# Date 1471357495 14400
# Node ID daff39af0c6d9e2b733bef59af4f9d1319f8a6fa
# Parent d5e6b2265d6f0b191066887e9c74b563b5038993
changeset logjam
diff -r d5e6b2265d6f -r daff39af0c6d LibKraken/LibKraken.toc
--- a/LibKraken/LibKraken.toc Tue Aug 16 10:22:48 2016 -0400
+++ b/LibKraken/LibKraken.toc Tue Aug 16 10:24:55 2016 -0400
@@ -9,4 +9,4 @@
## OptionalDeps: Ace3, LibStub
LibStub\LibStub.lua
-LibKraken-1.0.xml
+LibKraken.xml
diff -r d5e6b2265d6f -r daff39af0c6d SkeletonKey/ActionTemplates.lua
--- a/SkeletonKey/ActionTemplates.lua Tue Aug 16 10:22:48 2016 -0400
+++ b/SkeletonKey/ActionTemplates.lua Tue Aug 16 10:24:55 2016 -0400
@@ -14,7 +14,7 @@
local GetNumBindings, GetBinding = GetNumBindings, GetBinding
local kb, print, wrap = LibStub('LibKraken').register(KeyBinder, 'Info')
-local cprint = DEVIAN_WORKSPACE and function(...) _G.print('Cfg', ...) end or function() end
+local cprint = (DEVIAN_PNAME == 'SkeletonKey') and function(...) _G.print('Cfg', ...) end or function() end
local CLICK_KEYBINDER_MACRO = "CLICK KeyBinderMacro:"
local CLICK_KEYBINDER_KEY = "CLICK KeyBinderKey:"
@@ -302,6 +302,10 @@
kb.UpdatePetInfo = function()
local hasPetSpells, petType = HasPetSpells()
+
+ --kb.PetCache.specNum = GetSpecialization(nil, true)
+ --kb.PetCache.specID, kb.PetCache.specName = GetSpecializationInfo(petSpec, nil, true)
+
if PetHasSpellbook() then
print('PET SPELLBOOK')
local i = 1
@@ -318,6 +322,11 @@
print('|cFF00FF88spellslot['..spellName..']|r', '=>', i, subText)
if subText then
+ -- make sure that pet specialization subtext maps correctly
+ --if match(subText, kb.PetCache.specName) then
+ -- subText = 'specialization'
+ --end
+
kb.PetCache.subtext[subText] = kb.PetCache.subtext[subText] or {}
specialNum[subText] = (specialNum[subText] or 0) + 1
@@ -374,11 +383,15 @@
local n = GetNumBindings()
for i=1, n do
local command, key1, key2 = GetBinding(i)
- if key1 then
- kb.SystemBindings[key1] = command
- end
- if key2 then
- kb.SystemBindings[key2] = command
+ if not command:match('ACTION.*%d+') then
+ if key1 then
+ kb.SystemBindings[key1] = command
+ end
+ if key2 then
+ kb.SystemBindings[key2] = command
+ end
+ else
+ print('ignoring action button binding', command)
end
end
end
@@ -394,8 +407,13 @@
kb.pendingAttributes = {}
kb.SecureAttribute = function(target, name, value)
if InCombatLockdown() then
+ if #kb.pendingAttributes == 0 then
+ kb:Print(kb.L('Key bindings will be applied when you exit combat.'))
+ end
+
tinsert(kb.pendingAttributes, {target, name, value})
kb:RegisterEvent('PLAYER_REGEN_ENABLED')
+
else
print(target:GetName(), 'attribute', '"'.. tostring(name)..'" = "'..tostring(value)..'"')
diff -r d5e6b2265d6f -r daff39af0c6d SkeletonKey/BindingsFrame.lua
--- a/SkeletonKey/BindingsFrame.lua Tue Aug 16 10:22:48 2016 -0400
+++ b/SkeletonKey/BindingsFrame.lua Tue Aug 16 10:24:55 2016 -0400
@@ -32,6 +32,26 @@
[BINDING_TYPE_GLOBAL] = {0, 1, 1}
}
+--[=[
+ -- some useful texture paths
+ [[Interface\PaperDollInfoFrame\UI-GearManager-Undo]]
+ [[Interface\PetPaperDollFrame\UI-PetHappiness]]
+ [[Interface\RAIDFRAME\ReadyCheck-Waiting]]
+ [[Interface\RAIDFRAME\ReadyCheck-Read]]
+ [[Interface\RAIDFRAME\ReadyCheck-NotReady]]
+ [[Interface\TradeSkillFrame\UI-TradeSkill-LinkButton]]
+ [[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]]
+ [[Interface\UI-TutorialFrame-QuestGiver\UI-TutorialFrame-QuestGray]]
+--]=]
+local lastFolder
+local addT = function(frame, key, folder, name)
+ folder = folder or lastFolder
+ frame[key] = frame:CreateTexture()
+ frame[key]:SetTexture('Interface\\' .. folder .. '\\' .. name)
+ frame[key]:SetPoint('TOPLEFT')
+ lastFolder = folder
+end
+
local restingAlpha = 0.7
local fadeTime, fadeDelay = .30, 0.15
local saveButton
@@ -82,6 +102,7 @@
end
elseif click == 'RightButton' then
kb.ReleaseSlot(self)
+ kb.ui()
end
end
@@ -181,12 +202,14 @@
kb.ui(true)
end
-local KeyBinder_CheckButton = function(frame ,enableText, disableText, dbKey, tooltipText, callback)
+local frameCount = 0
+local lastCheckFrame
+local KeyBinder_CheckButton = function(frame ,enableText, disableText, dbKey, tooltipText, callback, header)
if kb.db[dbKey] then
frame:SetChecked(true)
end
- frame.label:SetText(kb.db[dbKey] and enableText or disableText)
- frame:SetWidth(frame.label:GetStringWidth()+8)
+
+ frame.header:SetText(header)
frame:SetScript('OnClick', function(self)
if callback then
@@ -198,8 +221,6 @@
kb.DeactivateSlot(kb.saveTarget)
end
end
- self.label:SetText(kb.db[dbKey] and enableText or disableText)
- self:SetWidth(self.label:GetStringWidth()+8)
kb.ui()
end)
@@ -216,6 +237,25 @@
GameTooltip:Hide()
end
end)
+
+ if frame:GetID() == 0 then
+ frameCount = frameCount + 1
+ frame:SetID(frameCount)
+ print('checkbutton #', frameCount)
+ if frameCount == 1 then
+ frame:ClearAllPoints()
+ frame:SetPoint('TOP', KeyBinderInventoryButton, 'BOTTOM', 0, -22)
+ frame:SetPoint('LEFT', kb.sourcesbg, 'LEFT', 2, 0)
+ else
+ frame:ClearAllPoints()
+ frame:SetPoint('TOPLEFT', lastCheckFrame, 'BOTTOMLEFT', 0, -2)
+ end
+
+ frame.header:ClearAllPoints()
+ frame.header:SetPoint('LEFT', frame, 'RIGHT', 2, 0)
+
+ lastCheckFrame = frame
+ end
end
local KeyBinder_OnHide = function()
@@ -319,8 +359,9 @@
function() OpenAllBags() end,
"Interface\\BUTTONS\\UI-MicroButtonCharacter-Up", {0, 1, .4, 1})
- KeyBinder_CheckButton(KeyBinderStickyMode, 'Enabled', 'Disabled', 'stickyMode', 'Keep input active after receiving a key.')
- KeyBinder_CheckButton(KeyBinderHoverInput, 'MouseOver', 'Click', 'hoverInput', 'Enable key input when the cursor is over a binding slot.')
+ KeyBinder_CheckButton(KeyBinderStickyMode, 'Enabled', 'Disabled', 'stickyMode', 'Keep input active after receiving a key.', nil, 'Sticky:')
+ KeyBinder_CheckButton(KeyBinderHoverInput, 'MouseOver', 'Click', 'hoverInput', 'Enable key input when the cursor is over a binding slot.', nil, 'Bind by:')
+ KeyBinder_CheckButton(KeyBinderProtectBindings, 'Block', 'Allow', 'protectBlizKeys', 'Allow overwriting Blizzard UI bindings.', nil, 'Safety:')
KeyBinderUnbindButton:SetScript('OnClick', function()
diff -r d5e6b2265d6f -r daff39af0c6d SkeletonKey/Events.lua
--- a/SkeletonKey/Events.lua Tue Aug 16 10:22:48 2016 -0400
+++ b/SkeletonKey/Events.lua Tue Aug 16 10:24:55 2016 -0400
@@ -60,4 +60,8 @@
kb.SPELLS_CHANGED = function(self, event, unit)
print('|cFFFF0088'.. event..'|r', unit)
kb.UpdatePetInfo()
+end
+
+kb.BINDINGS_UPDATE = function()
+ kb.UpdateSystemBinds()
end
\ No newline at end of file
diff -r d5e6b2265d6f -r daff39af0c6d SkeletonKey/KeyButton.lua
--- a/SkeletonKey/KeyButton.lua Tue Aug 16 10:22:48 2016 -0400
+++ b/SkeletonKey/KeyButton.lua Tue Aug 16 10:24:55 2016 -0400
@@ -357,6 +357,7 @@
end
end
+
if self.command then
print('['..slot..'] =', self.command, GetBindingKey(self.command))
@@ -447,6 +448,10 @@
self.icon:SetTexture(GetSpellTexture(self.actionID))
end
else
+ if kb.saveTarget == self then
+ kb.DeactivateSlot(self)
+ end
+
self.ignoreTexture:Hide()
end
diff -r d5e6b2265d6f -r daff39af0c6d SkeletonKey/SkeletonKey.xml
--- a/SkeletonKey/SkeletonKey.xml Tue Aug 16 10:22:48 2016 -0400
+++ b/SkeletonKey/SkeletonKey.xml Tue Aug 16 10:24:55 2016 -0400
@@ -83,6 +83,9 @@
+
+
+
self:RegisterForDrag('LeftButton')
@@ -197,6 +200,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
+
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
@@ -331,10 +347,11 @@
-
-
+
+
+
\ No newline at end of file