diff --git a/api/config.lua b/api/config.lua index 9ba15427..0af7242b 100644 --- a/api/config.lua +++ b/api/config.lua @@ -459,6 +459,7 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("bars", nil, "altself", "0") pfUI:UpdateConfig("bars", nil, "rightself", "0") pfUI:UpdateConfig("bars", nil, "animation", "zoomfade") + pfUI:UpdateConfig("bars", nil, "animmode", "keypress") pfUI:UpdateConfig("bars", nil, "animalways", "0") pfUI:UpdateConfig("bars", nil, "reagents", "1") pfUI:UpdateConfig("bars", nil, "hunterbar", "0") diff --git a/modules/actionbar.lua b/modules/actionbar.lua index da5a71fb..9d64d172 100644 --- a/modules/actionbar.lua +++ b/modules/actionbar.lua @@ -275,7 +275,7 @@ pfUI:RegisterModule("actionbar", "vanilla:tbc", function () -- trigger action animation if ( pfUI_config.bars.keydown == "1" and keystate == "down" ) or (pfUI_config.bars.keydown == "0" and keystate == "up" ) or self.bar == 11 or mouse then - if self:GetAlpha() > .1 or C.bars.animalways == "1" then + if C.bars.animmode == "keypress" and ( self:GetAlpha() > .1 or C.bars.animalways == "1" ) then self.animation.active = 0 self.animation:Show() end @@ -401,6 +401,11 @@ pfUI:RegisterModule("actionbar", "vanilla:tbc", function () -- active border if active then + if C.bars.animmode == "statechange" and not self.active:IsShown() then + self.animation.active = 0 + self.animation:Show() + end + self.backdrop:SetBackdropBorderColor(cr,cg,cb,1) self.active:Show() else diff --git a/modules/gui.lua b/modules/gui.lua index 9bf5c20b..ab59e7b6 100644 --- a/modules/gui.lua +++ b/modules/gui.lua @@ -1115,6 +1115,10 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function () "elasticzoom:" .. T["Elastic Zoom"], "wobblezoom:" .. T["Wobble Zoom"], }, + ["animationmode"] = { + "keypress:" .. T["On Key Press"], + "statechange:" .. T["On State Change"] + }, ["actionbarbuttons"] = { "1","2","3","4","5","6","7","8","9","10","11","12" }, @@ -1828,6 +1832,7 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function () CreateConfig(U["bars"], T["Self Cast: Alt Key"], C.bars, "altself", "checkbox") CreateConfig(U["bars"], T["Self Cast: Right Click"], C.bars, "rightself", "checkbox") 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["Show Reagent Count"], C.bars, "reagents", "checkbox") CreateConfig(U["bars"], T["Highlight Equipped Items"], C.bars, "showequipped", "checkbox")