Mercurial > wow > skeletonkey
comparison SkeletonKey/HotKey.lua @ 57:9eebce04e69b
- Prevent bind settings from being updated in combat.
- Close the UI during combat.
- Resolve conflicting keybinds and inform the user of any results.
- Resolve conflicts for talents, but only when they are active.
author | Nenue |
---|---|
date | Mon, 22 Aug 2016 09:24:02 -0400 |
parents | a545933ddf3d |
children | d8bb2629fea8 |
comparison
equal
deleted
inserted
replaced
56:2a95f4010c5a | 57:9eebce04e69b |
---|---|
109 | 109 |
110 | 110 |
111 if bindings[indexKey] then | 111 if bindings[indexKey] then |
112 --print('|cFFFFFF00'..frame:GetName(), actionType, actionID, hasAction) | 112 --print('|cFFFFFF00'..frame:GetName(), actionType, actionID, hasAction) |
113 local binds = bindings[indexKey] | 113 local binds = bindings[indexKey] |
114 if binds then | 114 if binds and (not frame.HotKey:IsVisible()) then |
115 if hasAction then | 115 if hasAction then |
116 local bindingsText = kb.BindingString(unpack(binds)) | 116 local bindingsText = kb.BindingString(unpack(binds)) |
117 | 117 |
118 if not hotkeyText[frame] then | 118 if not hotkeyText[frame] then |
119 print('-new hotkey element') | 119 print('-new hotkey element') |
120 hotkeyText[frame] = frame:CreateFontString(frame:GetName()..'SkeletonKey', 'OVERLAY') | 120 hotkeyText[frame] = frame:CreateFontString(frame:GetName()..'SkeletonKey', 'OVERLAY') |
121 hotkeyText[frame]:SetFont(frame.HotKey:GetFont()) | 121 hotkeyText[frame]:SetFont(frame.HotKey:GetFont()) |
122 hotkeyText[frame]:SetTextColor(frame.HotKey:GetTextColor()) | 122 hotkeyText[frame]:SetTextColor(frame.HotKey:GetTextColor()) |
123 hotkeyText[frame]:SetPoint('TOPRIGHT', frame.HotKey, 'TOPRIGHT') | 123 hotkeyText[frame]:SetPoint('TOPRIGHT', frame.HotKey, 'TOPRIGHT') |
124 | |
125 hooksecurefunc(frame.HotKey, 'SetVertexColor', function(self, r,g,b,a) | |
126 hotkeyText[frame]:SetTextColor(r,g,b,a) | |
127 end) | |
124 end | 128 end |
125 | 129 |
126 hotkeyText[frame]:SetText(bindingsText) | 130 hotkeyText[frame]:SetText(bindingsText) |
127 hotkeyText[frame]:Show() | 131 hotkeyText[frame]:Show() |
128 print('|cFF00FFFFUpdate text for', frame:GetName(), '|cFFFFFF00'..tostring(bindingsText)..'|r') | 132 print('|cFF00FFFFUpdate text for', frame:GetName(), '|cFFFFFF00'..tostring(bindingsText)..'|r') |