mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-22 23:56:57 +00:00
castbar: add option to change color
This commit is contained in:
+8
-4
@@ -31,7 +31,8 @@ pfUI:RegisterModule("castbar", function ()
|
||||
pfUI.castbar.player.bar:SetAllPoints(pfUI.castbar.player)
|
||||
pfUI.castbar.player.bar:SetMinMaxValues(0, 100)
|
||||
pfUI.castbar.player.bar:SetValue(20)
|
||||
pfUI.castbar.player.bar:SetStatusBarColor(.7,.7,.9,.8)
|
||||
local r,g,b,a = strsplit(",", pfUI_config.appearance.castbar.castbarcolor)
|
||||
pfUI.castbar.player.bar:SetStatusBarColor(r,g,b,a)
|
||||
|
||||
-- text left
|
||||
pfUI.castbar.player.bar.left = pfUI.castbar.player.bar:CreateFontString("Status", "DIALOG", "GameFontNormal")
|
||||
@@ -72,7 +73,8 @@ pfUI:RegisterModule("castbar", function ()
|
||||
pfUI.castbar.player.delay = 0
|
||||
pfUI.castbar.player.spell = arg1
|
||||
pfUI.castbar.player.bar.left:SetText(arg1)
|
||||
pfUI.castbar.player.bar:SetStatusBarColor(.7,.7,.9,.8)
|
||||
local r,g,b,a = strsplit(",", pfUI_config.appearance.castbar.castbarcolor)
|
||||
pfUI.castbar.player.bar:SetStatusBarColor(r,g,b,a)
|
||||
pfUI.castbar.player.startTime = GetTime()
|
||||
pfUI.castbar.player.maxValue = pfUI.castbar.player.startTime + (arg2 / 1000)
|
||||
pfUI.castbar.player.endTime = nil
|
||||
@@ -89,7 +91,8 @@ pfUI:RegisterModule("castbar", function ()
|
||||
pfUI.castbar.player.delay = 0
|
||||
pfUI.castbar.player.spell = arg2
|
||||
pfUI.castbar.player.bar.left:SetText(arg2)
|
||||
pfUI.castbar.player.bar:SetStatusBarColor(.9,.9,.7,.8)
|
||||
local r,g,b,a = strsplit(",", pfUI_config.appearance.castbar.channelcolor)
|
||||
pfUI.castbar.player.bar:SetStatusBarColor(r,g,b,a)
|
||||
pfUI.castbar.player.maxValue = nil
|
||||
pfUI.castbar.player.startTime = GetTime()
|
||||
pfUI.castbar.player.endTime = pfUI.castbar.player.startTime + (arg1 / 1000)
|
||||
@@ -211,7 +214,8 @@ pfUI:RegisterModule("castbar", function ()
|
||||
pfUI.castbar.target.bar:SetAllPoints(pfUI.castbar.target)
|
||||
pfUI.castbar.target.bar:SetMinMaxValues(0, 100)
|
||||
pfUI.castbar.target.bar:SetValue(20)
|
||||
pfUI.castbar.target.bar:SetStatusBarColor(.7,.7,.9,.8)
|
||||
local r,g,b,a = strsplit(",", pfUI_config.appearance.castbar.castbarcolor)
|
||||
pfUI.castbar.target.bar:SetStatusBarColor(r,g,b,a)
|
||||
|
||||
-- text left
|
||||
pfUI.castbar.target.bar.left = pfUI.castbar.target.bar:CreateFontString("Status", "DIALOG", "GameFontNormal")
|
||||
|
||||
@@ -22,6 +22,8 @@ function pfUI:LoadConfig()
|
||||
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("appearance", "castbar", "castbarcolor", ".7,.7,.9,.8")
|
||||
pfUI:UpdateConfig("appearance", "castbar", "channelcolor", ".9,.9,.7,.8")
|
||||
pfUI:UpdateConfig("unitframes", nil, "disable", "0")
|
||||
pfUI:UpdateConfig("unitframes", nil, "pastel", "1")
|
||||
pfUI:UpdateConfig("unitframes", nil, "dark", "0")
|
||||
|
||||
@@ -672,6 +672,8 @@ pfUI:RegisterModule("gui", function ()
|
||||
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")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Castbar color", pfUI_config.appearance.castbar, "castbarcolor", "color")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Castbar color (Channeling)", pfUI_config.appearance.castbar, "channelcolor", "color")
|
||||
|
||||
-- modules
|
||||
pfUI.gui.modules = pfUI.gui:CreateConfigTab("Modules")
|
||||
|
||||
Reference in New Issue
Block a user