mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-06 13:40:00 +00:00
actionbar: option to only show during combat
This commit is contained in:
@@ -503,6 +503,7 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("bars", "bar"..i, "showcount", "1")
|
||||
pfUI:UpdateConfig("bars", "bar"..i, "autohide", "0")
|
||||
pfUI:UpdateConfig("bars", "bar"..i, "hide_time", "3")
|
||||
pfUI:UpdateConfig("bars", "bar"..i, "hide_combat", "1")
|
||||
if i ~= 11 and i ~= 12 then
|
||||
pfUI:UpdateConfig("bars", "bar"..i, "buttons", "12")
|
||||
end
|
||||
|
||||
@@ -1200,6 +1200,7 @@ pfUI:RegisterModule("actionbar", "vanilla:tbc", function ()
|
||||
local formfactor = C.bars["bar"..i].formfactor
|
||||
local autohide = C.bars["bar"..i].autohide
|
||||
local hide_time = C.bars["bar"..i].hide_time
|
||||
local hide_combat = C.bars["bar"..i].hide_combat == "1" and true or nil
|
||||
|
||||
local buttons = tonumber(C.bars["bar"..i].buttons) or 12
|
||||
if i == 11 and bars[i] then -- shapeshift buttons
|
||||
@@ -1235,7 +1236,7 @@ pfUI:RegisterModule("actionbar", "vanilla:tbc", function ()
|
||||
|
||||
-- autohide
|
||||
if autohide == "1" then
|
||||
EnableAutohide(bars[i], tonumber(hide_time))
|
||||
EnableAutohide(bars[i], tonumber(hide_time), hide_combat)
|
||||
else
|
||||
DisableAutohide(bars[i])
|
||||
end
|
||||
|
||||
@@ -2025,6 +2025,7 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function ()
|
||||
|
||||
CreateConfig(U["bars"], T["Enable Autohide"], C.bars["bar"..id], "autohide", "checkbox")
|
||||
CreateConfig(U["bars"], T["Autohide Timeout"], C.bars["bar"..id], "hide_time")
|
||||
CreateConfig(U["bars"], T["Show In Combat"], C.bars["bar"..id], "hide_combat", "checkbox")
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user