mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-26 05:50:50 +00:00
Split chat faction and race icons into separate options
This commit is contained in:
@@ -293,14 +293,6 @@ function pfUI.api.GetFactionIcon(raceKey)
|
||||
return FACTION_ICON[info.faction] or ""
|
||||
end
|
||||
|
||||
-- [ GetPlayerRaceIcons ]
|
||||
-- Returns the faction and race emblems of the player character.
|
||||
-- return: [string] both inline textures, or an empty string
|
||||
function pfUI.api.GetPlayerRaceIcons()
|
||||
local _, raceKey = UnitRace("player")
|
||||
return pfUI.api.GetFactionIcon(raceKey) .. pfUI.api.GetRaceIcon(raceKey, UnitSex("player"))
|
||||
end
|
||||
|
||||
-- [ strvertical ]
|
||||
-- Creates vertical text using linebreaks. Multibyte char friendly.
|
||||
-- 'str' [string] String to columnize.
|
||||
|
||||
+2
-1
@@ -826,7 +826,8 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("chat", "text", "playerlinks", "1")
|
||||
pfUI:UpdateConfig("chat", "text", "detecturl", "1")
|
||||
pfUI:UpdateConfig("chat", "text", "classcolor", "1")
|
||||
pfUI:UpdateConfig("chat", "text", "playericons", "0")
|
||||
pfUI:UpdateConfig("chat", "text", "factionicons", "0")
|
||||
pfUI:UpdateConfig("chat", "text", "raceicons", "0")
|
||||
pfUI:UpdateConfig("chat", "text", "playerlevel", "0")
|
||||
pfUI:UpdateConfig("chat", "left", "width", "380")
|
||||
pfUI:UpdateConfig("chat", "left", "height", "180")
|
||||
|
||||
+5
-2
@@ -843,8 +843,11 @@ pfUI:RegisterModule("chat", function ()
|
||||
end
|
||||
if class and class ~= UNKNOWN then
|
||||
color = "|c" .. PFUI_CLASS_COLORS[class].colorStr
|
||||
if C.chat.text.playericons == "1" then
|
||||
icon = GetFactionIcon(raceKey) .. GetRaceIcon(raceKey, sex)
|
||||
if C.chat.text.factionicons == "1" then
|
||||
icon = GetFactionIcon(raceKey)
|
||||
end
|
||||
if C.chat.text.raceicons == "1" then
|
||||
icon = icon .. GetRaceIcon(raceKey, sex)
|
||||
end
|
||||
elseif C.chat.text.tintunknown == "1" then
|
||||
color = unknowncolorhex
|
||||
|
||||
+3
-1
@@ -2879,7 +2879,9 @@ pfUI:RegisterModule("gui", function ()
|
||||
CreateConfig(nil, T["Generate Playerlinks"], C.chat.text, "playerlinks", "checkbox")
|
||||
CreateConfig(nil, T["Enable URL Detection"], C.chat.text, "detecturl", "checkbox")
|
||||
CreateConfig(nil, T["Enable Class Colors"], C.chat.text, "classcolor", "checkbox")
|
||||
CreateConfig(nil, T["Show Faction & Race Icons"] .. " " .. GetPlayerRaceIcons(), C.chat.text, "playericons", "checkbox")
|
||||
local _, playerRace = UnitRace("player")
|
||||
CreateConfig(nil, T["Show Faction Icons"] .. " " .. GetFactionIcon(playerRace), C.chat.text, "factionicons", "checkbox")
|
||||
CreateConfig(nil, T["Show Race Icons"] .. " " .. GetRaceIcon(playerRace, UnitSex("player")), C.chat.text, "raceicons", "checkbox")
|
||||
CreateConfig(nil, T["Enable Player Levels"], C.chat.text, "playerlevel", "checkbox")
|
||||
CreateConfig(nil, T["Colorize Unknown Classes"], C.chat.text, "tintunknown", "checkbox")
|
||||
CreateConfig(nil, T["Unknown Class Color"], C.chat.text, "unknowncolor", "color")
|
||||
|
||||
Reference in New Issue
Block a user