Allow mouse keybinds to be configured

This commit is contained in:
2023-04-01 05:19:03 +02:00
parent e72c4b3e3f
commit 464fcbb1df
2 changed files with 105 additions and 27 deletions

View File

@@ -31,6 +31,33 @@ local function RangeConfig()
end
end
local function MouseConfig()
local _, class = UnitClass("player")
if class == "SHAMAN" then
return {
-- No modifier
{button="mouse1", mods={}, kind="target"},
{button="mouse2", mods={}, kind="macro", data="/use [@UNIT,dead,help]Ancestral Vision; [@UNIT,help]Chain Heal"},
{button="mouse3", mods={}, kind="macro", data="/use [@UNIT,dead,help]Ancestral Spirit; [@UNIT,help]Purify Spirit"},
{button="wheel-up", mods={}, kind="macro", data="/use [@UNIT,help]Healing Surge"},
{button="wheel-down", mods={}, kind="macro", data="/use [@UNIT,help]Riptide"},
-- alt
{button="wheel-up", mods={alt=true}, kind="spell", data="Healing Wave"},
{button="wheel-down", mods={alt=true}, kind="spell", data="Earth Shield"},
-- Shift
{button="mouse2", mods={shift=true}, kind="togglemenu"},
}
else
return {
-- Super basic defaults
{button="mouse1", mods={}, kind="target"},
{button="mouse2", mods={shift=true}, kind="togglemenu"},
}
end
end
local types = omif.GetModule("types")
local UnitFrame = types.UnitFrame
local UnitGroup = types.UnitGroup
@@ -100,6 +127,7 @@ function CreateFrames()
height = 45,
},
range = RangeConfig(),
mouse = MouseConfig(),
hideInRaid = true,
}