mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-01 11:20:01 +00:00
cooldown: add option to set the minimal cooldown to display
This commit is contained in:
@@ -7,6 +7,7 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("global", nil, "font_default", "arial")
|
||||
pfUI:UpdateConfig("global", nil, "font_square", "homespun")
|
||||
pfUI:UpdateConfig("global", nil, "font_combat", "diediedie")
|
||||
pfUI:UpdateConfig("global", nil, "cooldown_min", "2")
|
||||
pfUI:UpdateConfig("unitframes", nil, "animation_speed", "5")
|
||||
pfUI:UpdateConfig("unitframes", nil, "portrait", "1")
|
||||
pfUI:UpdateConfig("unitframes", nil, "buff_size", "22")
|
||||
|
||||
@@ -4,7 +4,7 @@ pfUI:RegisterModule("cooldown", function ()
|
||||
-- disable animation
|
||||
this:SetPosition(1,1,1)
|
||||
|
||||
if ( start > 0 and duration > 2 and enable > 0) then
|
||||
if ( start > 0 and duration > tonumber(pfUI_config.global.cooldown_min) and enable > 0) then
|
||||
this.start = start
|
||||
this.duration = duration
|
||||
this.stopping = 0
|
||||
@@ -40,7 +40,7 @@ pfUI:RegisterModule("cooldown", function ()
|
||||
local remaining = this.duration - (GetTime() - this.start)
|
||||
|
||||
-- disable GCD notify
|
||||
if (remaining >= 0 and this.duration > 2) then
|
||||
if (remaining >= 0 and this.duration > tonumber(pfUI_config.global.cooldown_min)) then
|
||||
this.cd:Show()
|
||||
local unit = ""
|
||||
if remaining > 99 then
|
||||
|
||||
@@ -557,6 +557,7 @@ pfUI:RegisterModule("gui", function ()
|
||||
pfUI.gui:CreateConfig(pfUI.gui.global, "Default Font", pfUI_config.global, "font_default", "dropdown", values)
|
||||
pfUI.gui:CreateConfig(pfUI.gui.global, "Square Font", pfUI_config.global, "font_square", "dropdown", values)
|
||||
pfUI.gui:CreateConfig(pfUI.gui.global, "Combat Font", pfUI_config.global, "font_combat", "dropdown", values)
|
||||
pfUI.gui:CreateConfig(pfUI.gui.global, "Minimal Cooldown duration (seconds)", pfUI_config.global, "cooldown_min")
|
||||
|
||||
-- modules
|
||||
pfUI.gui.modules = pfUI.gui:CreateConfigTab("Modules")
|
||||
|
||||
Reference in New Issue
Block a user