diff --git a/api/config.lua b/api/config.lua index c027b817..afffa6df 100644 --- a/api/config.lua +++ b/api/config.lua @@ -518,6 +518,7 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("bars", nil, "animation", "zoomfade") pfUI:UpdateConfig("bars", nil, "animmode", "keypress") pfUI:UpdateConfig("bars", nil, "animalways", "0") + pfUI:UpdateConfig("bars", nil, "macroscan", "1") pfUI:UpdateConfig("bars", nil, "reagents", "1") pfUI:UpdateConfig("bars", nil, "hunterbar", "0") pfUI:UpdateConfig("bars", nil, "pagemaster", "0") diff --git a/modules/actionbar.lua b/modules/actionbar.lua index d43ef07f..73d654fe 100644 --- a/modules/actionbar.lua +++ b/modules/actionbar.lua @@ -379,6 +379,7 @@ pfUI:RegisterModule("actionbar", "vanilla:tbc", function () local function ButtonMacroScan(self) if self.bar > 10 then return end + if not self.scanmacro then return end local macro = GetActionText(self.id) self.spellslot = nil @@ -404,6 +405,11 @@ pfUI:RegisterModule("actionbar", "vanilla:tbc", function () return end + -- allow the user to disable the scan + if match and strfind(match, "disable") then + return + end + if not match then -- add support to specify custom tooltips via: -- /run --showtooltip SPELLNAME @@ -1170,6 +1176,13 @@ pfUI:RegisterModule("actionbar", "vanilla:tbc", function () f.count:SetJustifyH("RIGHT") f.count:SetJustifyV("BOTTOM") + -- macro spell scan + if C.bars.macroscan == "0" then + f.scanmacro, f.spellslot, f.booktype = nil, nil, nil + else + f.scanmacro = true + end + -- range glow color f.rangeColor = { strsplit(",", C.bars.rangecolor) } diff --git a/modules/gui.lua b/modules/gui.lua index 9c2c92fe..1bd18e65 100644 --- a/modules/gui.lua +++ b/modules/gui.lua @@ -1942,6 +1942,7 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function () CreateConfig(U["bars"], T["Button Animation"], C.bars, "animation", "dropdown", pfUI.gui.dropdowns.actionbuttonanimations) CreateConfig(U["bars"], T["Button Animation Trigger"], C.bars, "animmode", "dropdown", pfUI.gui.dropdowns.animationmode) CreateConfig(U["bars"], T["Show Animation On Hidden Bars"], C.bars, "animalways", "checkbox") + CreateConfig(U["bars"], T["Scan Macros For Spells"], C.bars, "macroscan", "checkbox", nil, nil, nil, nil, "vanilla") CreateConfig(U["bars"], T["Show Reagent Count"], C.bars, "reagents", "checkbox") CreateConfig(U["bars"], T["Highlight Equipped Items"], C.bars, "showequipped", "checkbox") CreateConfig(U["bars"], T["Equipped Item Color"], C.bars, "eqcolor", "color")