mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-07 06:00:00 +00:00
cooldown: use colorpicker for cooldowns
This commit is contained in:
+3
-3
@@ -18,9 +18,9 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("appearance", "border", "panels", "-1")
|
||||
pfUI:UpdateConfig("appearance", "border", "chat", "-1")
|
||||
pfUI:UpdateConfig("appearance", "border", "bags", "-1")
|
||||
pfUI:UpdateConfig("appearance", "cd", "mincolor", "55ffff")
|
||||
pfUI:UpdateConfig("appearance", "cd", "hourcolor", "55aaff")
|
||||
pfUI:UpdateConfig("appearance", "cd", "daycolor", "5555ff")
|
||||
pfUI:UpdateConfig("appearance", "cd", "mincolor", ".2,1,1,1")
|
||||
pfUI:UpdateConfig("appearance", "cd", "hourcolor", ".2,.5,1,1")
|
||||
pfUI:UpdateConfig("appearance", "cd", "daycolor", ".2,.2,1,1")
|
||||
pfUI:UpdateConfig("appearance", "cd", "threshold", "2")
|
||||
pfUI:UpdateConfig("unitframes", nil, "disable", "0")
|
||||
pfUI:UpdateConfig("unitframes", nil, "pastel", "1")
|
||||
|
||||
@@ -16,24 +16,26 @@ pfUI:RegisterModule("cooldown", function ()
|
||||
|
||||
local remaining = this.duration - (GetTime() - this.start)
|
||||
if remaining >= 0 then
|
||||
local r, g, b, a = 1, 1, 1, 1
|
||||
local unit = ""
|
||||
local color = "|cffffffff"
|
||||
if remaining > 99 then
|
||||
remaining = remaining / 60
|
||||
unit = "m"
|
||||
color = "|cff" .. pfUI_config.appearance.cd.mincolor
|
||||
r,g,b,a = strsplit(",", pfUI_config.appearance.cd.mincolor)
|
||||
end
|
||||
if remaining > 99 then
|
||||
remaining = remaining / 60
|
||||
unit = "h"
|
||||
color = "|cff" .. pfUI_config.appearance.cd.hourcolor
|
||||
r,g,b,a = strsplit(",", pfUI_config.appearance.cd.hourcolor)
|
||||
end
|
||||
if remaining > 99 then
|
||||
remaining = remaining / 24
|
||||
unit = "d"
|
||||
color = "|cff" .. pfUI_config.appearance.cd.daycolor
|
||||
r,g,b,a = strsplit(",", pfUI_config.appearance.cd.daycolor)
|
||||
end
|
||||
this.text:SetText(color .. round(remaining) .. unit)
|
||||
this.text:SetText(round(remaining) .. unit)
|
||||
this.text:SetTextColor(r,g,b,a)
|
||||
else
|
||||
this:Hide()
|
||||
end
|
||||
|
||||
+3
-3
@@ -663,9 +663,9 @@ pfUI:RegisterModule("gui", function ()
|
||||
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Panel Bordersize", pfUI_config.appearance.border, "panels")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Chat Bordersize", pfUI_config.appearance.border, "chat")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Bags Bordersize", pfUI_config.appearance.border, "bags")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Cooldown color (Minutes)", pfUI_config.appearance.cd, "mincolor")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Cooldown color (Hours)", pfUI_config.appearance.cd, "hourcolor")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Cooldown color (Days)", pfUI_config.appearance.cd, "daycolor")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Cooldown color (Minutes)", pfUI_config.appearance.cd, "mincolor", "color")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Cooldown color (Hours)", pfUI_config.appearance.cd, "hourcolor", "color")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Cooldown color (Days)", pfUI_config.appearance.cd, "daycolor", "color")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Cooldown text threshold", pfUI_config.appearance.cd, "threshold")
|
||||
|
||||
-- modules
|
||||
|
||||
Reference in New Issue
Block a user