cooldown: add option to set the minimal cooldown to display

This commit is contained in:
shagu
2016-11-10 23:42:08 +01:00
parent afc77c64d0
commit eec32923cb
3 changed files with 4 additions and 2 deletions
+1
View File
@@ -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")
+2 -2
View File
@@ -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
+1
View File
@@ -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")