mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-28 02:16:02 +00:00
nameplates: add option to disable class color
This commit is contained in:
@@ -145,6 +145,8 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("nameplates", nil, "clickthrough", "0")
|
||||
pfUI:UpdateConfig("nameplates", nil, "rightclick", "1")
|
||||
pfUI:UpdateConfig("nameplates", nil, "clickthreshold", "0.5")
|
||||
pfUI:UpdateConfig("nameplates", nil, "enemyclassc", "1")
|
||||
pfUI:UpdateConfig("nameplates", nil, "friendclassc", "1")
|
||||
pfUI:UpdateConfig("nameplates", nil, "raidiconsize", "16")
|
||||
pfUI:UpdateConfig("nameplates", nil, "players", "0")
|
||||
pfUI:UpdateConfig("nameplates", nil, "showhp", "0")
|
||||
|
||||
@@ -991,6 +991,8 @@ pfUI:RegisterModule("gui", function ()
|
||||
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Enable Clickthrough:", pfUI_config.nameplates, "clickthrough", "checkbox")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Enable MouseLook on right-clicks:", pfUI_config.nameplates, "rightclick", "checkbox")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Rightclick threshold:", pfUI_config.nameplates, "clickthreshold")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Show class colors on enemies:", pfUI_config.nameplates, "enemyclassc", "checkbox")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Show class colors on friends:", pfUI_config.nameplates, "friendclassc", "checkbox")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Raidicon size:", pfUI_config.nameplates, "raidiconsize")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Show Players only:", pfUI_config.nameplates, "players", "checkbox")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Show Healthpoints:", pfUI_config.nameplates, "showhp", "checkbox")
|
||||
|
||||
+19
-9
@@ -228,18 +228,28 @@ pfUI:RegisterModule("nameplates", function ()
|
||||
|
||||
-- adjust healthbar color
|
||||
local red, green, blue, _ = healthbar:GetStatusBarColor()
|
||||
if pfUI_playerDB[name:GetText()] and pfUI_playerDB[name:GetText()]["class"] and RAID_CLASS_COLORS[pfUI_playerDB[name:GetText()]["class"]] then
|
||||
healthbar:SetStatusBarColor(
|
||||
RAID_CLASS_COLORS[pfUI_playerDB[name:GetText()]["class"]].r,
|
||||
RAID_CLASS_COLORS[pfUI_playerDB[name:GetText()]["class"]].g,
|
||||
RAID_CLASS_COLORS[pfUI_playerDB[name:GetText()]["class"]].b,
|
||||
0.9)
|
||||
elseif red > 0.9 and green < 0.2 and blue < 0.2 then
|
||||
healthbar:SetStatusBarColor(.9,.2,.3,0.8)
|
||||
if red > 0.9 and green < 0.2 and blue < 0.2 then
|
||||
if pfUI_config.nameplates["enemyclassc"] == "1" and pfUI_playerDB[name:GetText()] and pfUI_playerDB[name:GetText()]["class"] and RAID_CLASS_COLORS[pfUI_playerDB[name:GetText()]["class"]] then
|
||||
healthbar:SetStatusBarColor(
|
||||
RAID_CLASS_COLORS[pfUI_playerDB[name:GetText()]["class"]].r,
|
||||
RAID_CLASS_COLORS[pfUI_playerDB[name:GetText()]["class"]].g,
|
||||
RAID_CLASS_COLORS[pfUI_playerDB[name:GetText()]["class"]].b,
|
||||
0.9)
|
||||
else
|
||||
healthbar:SetStatusBarColor(.9,.2,.3,0.8)
|
||||
end
|
||||
elseif red > 0.9 and green > 0.9 and blue < 0.2 then
|
||||
healthbar:SetStatusBarColor(1,1,.3,0.8)
|
||||
elseif blue > 0.9 and red == 0 and green == 0 then
|
||||
healthbar:SetStatusBarColor(0.2,0.6,1,0.8)
|
||||
if pfUI_config.nameplates["friendclassc"] == "1" and pfUI_playerDB[name:GetText()] and pfUI_playerDB[name:GetText()]["class"] and RAID_CLASS_COLORS[pfUI_playerDB[name:GetText()]["class"]] then
|
||||
healthbar:SetStatusBarColor(
|
||||
RAID_CLASS_COLORS[pfUI_playerDB[name:GetText()]["class"]].r,
|
||||
RAID_CLASS_COLORS[pfUI_playerDB[name:GetText()]["class"]].g,
|
||||
RAID_CLASS_COLORS[pfUI_playerDB[name:GetText()]["class"]].b,
|
||||
0.9)
|
||||
else
|
||||
healthbar:SetStatusBarColor(0.2,0.6,1,0.8)
|
||||
end
|
||||
elseif red == 0 and green > 0.99 and blue == 0 then
|
||||
healthbar:SetStatusBarColor(0.6,1,0,0.8)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user