Skip to content

Commit

Permalink
Debuff Tooltip Toggle keybinding
Browse files Browse the repository at this point in the history
  • Loading branch information
d87 committed Jun 24, 2021
1 parent 921fff3 commit e117d12
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Aptechka.lua
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,17 @@ local HealComm
local LibClassicDurations = LibStub("LibClassicDurations", true)
local spellNameToID = helpers.spellNameToID

Aptechka.L = setmetatable({}, {
local L = setmetatable({}, {
__index = function(t, k)
-- print(string.format('L["%s"] = ""',k:gsub("\n","\\n")));
return k
end,
__call = function(t,k) return t[k] end,
})
Aptechka.L = L

_G.BINDING_HEADER_APTECHKA = "Aptechka"
_G.BINDING_NAME_APTECHKA_DEBUFF_TOOLTIP_HOLD = L"Debuff Tooltip Toggle(Hold)"

local defaults = {
global = {
Expand Down Expand Up @@ -2507,6 +2511,13 @@ local onleave = function(self)
self:SetScript("OnUpdate", nil)
end

function Aptechka:ShowDebuffTooltipsOnMouseover()
if currentMouseoverFrame then
Aptechka:HideDebuffTooltips()
Aptechka:ShowDebuffTooltips(currentMouseoverFrame)
end
end

function Aptechka:MODIFIER_STATE_CHANGED(event)
if currentMouseoverFrame then
if Aptechka.tooltipPool.modchecks:CheckAND() then
Expand Down
9 changes: 9 additions & 0 deletions Bindings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Bindings>
<Binding name="APTECHKA_DEBUFF_TOOLTIP_HOLD" header="APTECHKA" runOnUp="true" category="ADDONS">
if keystate == "down" then
Aptechka:ShowDebuffTooltipsOnMouseover()
else
Aptechka:HideDebuffTooltips()
end
</Binding>
</Bindings>

0 comments on commit e117d12

Please sign in to comment.