Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions api/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,10 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("nameplates", nil, "enemyclassc", "1")
pfUI:UpdateConfig("nameplates", nil, "friendclassc", "1")
pfUI:UpdateConfig("nameplates", nil, "friendclassnamec", "0")
pfUI:UpdateConfig("nameplates", nil, "nameoffsetx", "0")
pfUI:UpdateConfig("nameplates", nil, "nameoffsety", "0")
pfUI:UpdateConfig("nameplates", nil, "leveloffsetx", "-3")
pfUI:UpdateConfig("nameplates", nil, "leveloffsety", "0")
pfUI:UpdateConfig("nameplates", nil, "raidiconsize", "16")
pfUI:UpdateConfig("nameplates", nil, "raidiconpos", "CENTER")
pfUI:UpdateConfig("nameplates", nil, "raidiconoffx", "0")
Expand Down
9 changes: 7 additions & 2 deletions env/translations_deDE.lua
Original file line number Diff line number Diff line change
Expand Up @@ -511,8 +511,13 @@ pfUI_translation["deDE"] = {
["Name | Health Missing"] = nil,
["Name (Linebreak) -Health Missing"] = nil,
["Nameplate Border Size"] = nil,
["Nameplates"] = nil,
["Nameplate Width"] = nil,
["Nameplates"] = nil, ["Nameplate Width"] = nil,
["Name Position"] = "Name Position",
["Name X-Offset"] = "Name X-Versatz",
["Name Y-Offset"] = "Name Y-Versatz",
["Level Position"] = "Level Position",
["Level X-Offset"] = "Level X-Versatz",
["Level Y-Offset"] = "Level Y-Versatz",
["Name (Short)"] = nil,
["Name (Short) | Health Missing"] = nil,
["Native"] = nil,
Expand Down
8 changes: 6 additions & 2 deletions env/translations_enUS.lua
Original file line number Diff line number Diff line change
Expand Up @@ -513,8 +513,12 @@ pfUI_translation["enUS"] = {
["Nameplate Border Size"] = nil,
["Nameplates"] = nil,
["Nameplate Width"] = nil,
["Name (Short)"] = nil,
["Name (Short) | Health Missing"] = nil,
["Name Position"]=nil,
["Name X-Offset"] = nil,
["Name Y-Offset"] = nil,
["Level Position"]=nil,
["Level X-Offset"] = nil,
["Level Y-Offset"] = nil,
["Native"] = nil,
["Network Down"] = nil,
["Network Latency"] = nil,
Expand Down
9 changes: 7 additions & 2 deletions env/translations_esES.lua
Original file line number Diff line number Diff line change
Expand Up @@ -511,8 +511,13 @@ pfUI_translation["esES"] = {
["Name | Health Missing"] = "Nombre | Falta de salud",
["Name (Linebreak) -Health Missing"] = nil,
["Nameplate Border Size"] = "Tamaño del borde de las placas de nombre",
["Nameplates"] = "Placas identificativas",
["Nameplate Width"] = "Ancho de las placas identificativas",
["Nameplates"] = "Placas identificativas", ["Nameplate Width"] = "Ancho de las placas identificativas",
["Name Position"] = "Posición del nombre",
["Name X-Offset"] = "Desplazamiento X del nombre",
["Name Y-Offset"] = "Desplazamiento Y del nombre",
["Level Position"] = "Posición del nivel",
["Level X-Offset"] = "Desplazamiento X del nivel",
["Level Y-Offset"] = "Desplazamiento Y del nivel",
["Name (Short)"] = "Nombre (corto)",
["Name (Short) | Health Missing"] = "Nombre (corto) | Falta de salud",
["Native"] = "Nativo",
Expand Down
9 changes: 7 additions & 2 deletions env/translations_frFR.lua
Original file line number Diff line number Diff line change
Expand Up @@ -511,8 +511,13 @@ pfUI_translation["frFR"] = {
["Name | Health Missing"] = "Nom | santé manquante",
["Name (Linebreak) -Health Missing"] = nil,
["Nameplate Border Size"] = "Taille de la bordure des barres de vie flottantes",
["Nameplates"] = "Barres de vie flottantes",
["Nameplate Width"] = "Largeur des barres de vie flottantes",
["Nameplates"] = "Barres de vie flottantes", ["Nameplate Width"] = "Largeur des barres de vie flottantes",
["Name Position"] = "Position du nom",
["Name X-Offset"] = "Décalage X du nom",
["Name Y-Offset"] = "Décalage Y du nom",
["Level Position"] = "Position du niveau",
["Level X-Offset"] = "Décalage X du niveau",
["Level Y-Offset"] = "Décalage Y du niveau",
["Name (Short)"] = "Nom (Court)",
["Name (Short) | Health Missing"] = "Nom (court) | santé manquante",
["Native"] = "Native",
Expand Down
9 changes: 7 additions & 2 deletions env/translations_koKR.lua
Original file line number Diff line number Diff line change
Expand Up @@ -511,8 +511,13 @@ pfUI_translation["koKR"] = {
["Name | Health Missing"] = nil,
["Name (Linebreak) -Health Missing"] = nil,
["Nameplate Border Size"] = nil,
["Nameplates"] = "상바",
["Nameplate Width"] = "상바 넓이",
["Nameplates"] = "상바", ["Nameplate Width"] = "상바 넓이",
["Name Position"] = "이름 위치",
["Name X-Offset"] = "이름 X 오프셋",
["Name Y-Offset"] = "이름 Y 오프셋",
["Level Position"] = "레벨 위치",
["Level X-Offset"] = "레벨 X 오프셋",
["Level Y-Offset"] = "레벨 Y 오프셋",
["Name (Short)"] = nil,
["Name (Short) | Health Missing"] = nil,
["Native"] = nil,
Expand Down
9 changes: 7 additions & 2 deletions env/translations_ruRU.lua
Original file line number Diff line number Diff line change
Expand Up @@ -511,8 +511,13 @@ pfUI_translation["ruRU"] = {
["Name | Health Missing"] = "Имя | Отсутствующее здоровье",
["Name (Linebreak) -Health Missing"] = "Имя (разрыв линии) -Отсутствует здоровье",
["Nameplate Border Size"] = "Размер границы индикатора здоровья",
["Nameplates"] = "Индикаторы здоровья",
["Nameplate Width"] = "Ширина индикатора здоровья",
["Nameplates"] = "Индикаторы здоровья", ["Nameplate Width"] = "Ширина индикатора здоровья",
["Name Position"] = "Позиция имени",
["Name X-Offset"] = "Смещение имени по X",
["Name Y-Offset"] = "Смещение имени по Y",
["Level Position"] = "Позиция уровня",
["Level X-Offset"] = "Смещение уровня по X",
["Level Y-Offset"] = "Смещение уровня по Y",
["Name (Short)"] = "Короткое имя",
["Name (Short) | Health Missing"] = "Короткое имя | Отсутствующее здоровье",
["Native"] = "Родная",
Expand Down
9 changes: 7 additions & 2 deletions env/translations_zhCN.lua
Original file line number Diff line number Diff line change
Expand Up @@ -511,8 +511,13 @@ pfUI_translation["zhCN"] = {
["Name | Health Missing"] = "名字 | 失去的生命值",
["Name (Linebreak) -Health Missing"] = "名字 (换行符) -失去的生命值",
["Nameplate Border Size"] = "姓名板边框尺寸",
["Nameplates"] = "姓名板",
["Nameplate Width"] = "姓名板宽度",
["Nameplates"] = "姓名板", ["Nameplate Width"] = "姓名板宽度",
["Name Position"] = "名字位置",
["Name X-Offset"] = "名字水平偏移",
["Name Y-Offset"] = "名字垂直偏移",
["Level Position"] = "等级位置",
["Level X-Offset"] = "等级水平偏移",
["Level Y-Offset"] = "等级垂直偏移",
["Name (Short)"] = "名字 (短)",
["Name (Short) | Health Missing"] = "名字 (短) | 失去的生命值",
["Native"] = "本地",
Expand Down
9 changes: 7 additions & 2 deletions env/translations_zhTW.lua
Original file line number Diff line number Diff line change
Expand Up @@ -511,8 +511,13 @@ pfUI_translation["zhTW"] = {
["Name | Health Missing"] = nil,
["Name (Linebreak) -Health Missing"] = nil,
["Nameplate Border Size"] = nil,
["Nameplates"] = "姓名板",
["Nameplate Width"] = "姓名板高度",
["Nameplates"] = "姓名板", ["Nameplate Width"] = "姓名板高度",
["Name Position"] = "名字位置",
["Name X-Offset"] = "名字水平偏移",
["Name Y-Offset"] = "名字垂直偏移",
["Level Position"] = "等級位置",
["Level X-Offset"] = "等級水平偏移",
["Level Y-Offset"] = "等級垂直偏移",
["Name (Short)"] = "名字 (短)",
["Name (Short) | Health Missing"] = nil,
["Native"] = "本地",
Expand Down
8 changes: 8 additions & 0 deletions modules/gui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2295,6 +2295,14 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function ()
CreateConfig(U["nameplates"], T["Replace Totems With Icons"], C.nameplates, "totemicons", "checkbox")
CreateConfig(U["nameplates"], T["Show Guild Name"], C.nameplates, "showguildname", "checkbox")

CreateConfig(nil, T["Name Position"], nil, nil, "header")
CreateConfig(U["nameplates"], T["Name X-Offset"], C.nameplates, "nameoffsetx")
CreateConfig(U["nameplates"], T["Name Y-Offset"], C.nameplates, "nameoffsety")

CreateConfig(nil, T["Level Position"], nil, nil, "header")
CreateConfig(U["nameplates"], T["Level X-Offset"], C.nameplates, "leveloffsetx")
CreateConfig(U["nameplates"], T["Level Y-Offset"], C.nameplates, "leveloffsety")

CreateConfig(nil, T["Raid Icon"], nil, nil, "header")
CreateConfig(U["nameplates"], T["Raid Icon Position"], C.nameplates, "raidiconpos", "dropdown", pfUI.gui.dropdowns.positions)
CreateConfig(U["nameplates"], T["Raid Icon X-Offset"], C.nameplates, "raidiconoffx")
Expand Down
22 changes: 15 additions & 7 deletions modules/nameplates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,6 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function ()
nameplate.health.text:SetTextColor(1,1,1,1)

nameplate.name = nameplate:CreateFontString(nil, "OVERLAY")
nameplate.name:SetPoint("TOP", nameplate, "TOP", 0, 0)

nameplate.glow = nameplate:CreateTexture(nil, "BACKGROUND")
nameplate.glow:SetPoint("CENTER", nameplate.health, "CENTER", 0, 0)
Expand All @@ -406,7 +405,6 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function ()
nameplate.guild:SetPoint("BOTTOM", nameplate.health, "BOTTOM", 0, 0)

nameplate.level = nameplate:CreateFontString(nil, "OVERLAY")
nameplate.level:SetPoint("RIGHT", nameplate.health, "LEFT", -3, 0)

nameplate.raidicon:SetParent(nameplate.health)
nameplate.raidicon:SetDrawLayer("OVERLAY")
Expand Down Expand Up @@ -515,19 +513,30 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function ()
c.NOTHREAT.r, c.NOTHREAT.g, c.NOTHREAT.b, c.NOTHREAT.a = GetStringColor(C.nameplates.combatnothreat)
c.STUN.r, c.STUN.g, c.STUN.b, c.STUN.a = GetStringColor(C.nameplates.combatstun)

-- Get name offset values from config
local nameOffsetX = tonumber(C.nameplates.nameoffsetx) or 0
local nameOffsetY = tonumber(C.nameplates.nameoffsety) or 0
local levelOffsetX = tonumber(C.nameplates.leveloffsetx) or 0
local levelOffsetY = tonumber(C.nameplates.leveloffsety) or 0

nameplate:SetWidth(plate_width)
nameplate:SetHeight(plate_height)
nameplate:SetPoint("TOP", parent, "TOP", 0, 0)

nameplate.name:SetFont(font, font_size, font_style)

nameplate.health:SetOrientation(orientation)
nameplate.health:SetPoint("TOP", nameplate.name, "BOTTOM", 0, healthoffset)
nameplate.health:SetPoint("TOP", nameplate, "BOTTOM", 0, healthoffset)
nameplate.health:SetStatusBarTexture(hptexture)
nameplate.health:SetWidth(C.nameplates.width)
nameplate.health:SetHeight(C.nameplates.heighthealth)
nameplate.health.hlr, nameplate.health.hlg, nameplate.health.hlb, nameplate.health.hla = hlr, hlg, hlb, hla

nameplate.name:SetFont(font, font_size, font_style)
nameplate.name:SetPoint("TOP", nameplate.health, "TOP", nameOffsetX, nameOffsetY)

nameplate.level:SetFont(font, font_size, font_style)
nameplate.level:ClearAllPoints()
nameplate.level:SetPoint("TOP", nameplate.health, "LEFT", levelOffsetX, levelOffsetY)
CreateBackdrop(nameplate.health, default_border)

nameplate.health.text:SetFont(font, font_size - 2, "OUTLINE")
Expand All @@ -541,7 +550,6 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function ()

nameplate.raidicon:ClearAllPoints()
nameplate.raidicon:SetPoint(C.nameplates.raidiconpos, nameplate.health, C.nameplates.raidiconpos, C.nameplates.raidiconoffx, C.nameplates.raidiconoffy)
nameplate.level:SetFont(font, font_size, font_style)
nameplate.raidicon:SetWidth(C.nameplates.raidiconsize)
nameplate.raidicon:SetHeight(C.nameplates.raidiconsize)

Expand Down Expand Up @@ -679,8 +687,8 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function ()
plate.guild:Hide()
plate.totem:Show()
elseif HidePlate(unittype, name, (hpmax-hp == hpmin), target) then
plate.level:SetPoint("RIGHT", plate.name, "LEFT", -3, 0)
plate.name:SetParent(plate)
plate.level:SetParent(plate)
plate.guild:SetPoint("BOTTOM", plate.name, "BOTTOM", -2, -(font_size + 2))

plate.level:Show()
Expand All @@ -693,8 +701,8 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function ()
end
plate.totem:Hide()
else
plate.level:SetPoint("RIGHT", plate.health, "LEFT", -5, 0)
plate.name:SetParent(plate.health)
plate.level:SetParent(plate.health)
plate.guild:SetPoint("BOTTOM", plate.health, "BOTTOM", 0, -(font_size + 4))

plate.level:Show()
Expand Down