pull request merge

https://github.com/me0wg4ming/pfUI/pull/118
This commit is contained in:
Meow
2026-03-23 11:37:31 +01:00
parent c45e6d5a7a
commit 1e3c260e52
3 changed files with 11 additions and 5 deletions
+2
View File
@@ -276,8 +276,10 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("unitframes", nil, "damage_tracking", "0")
-- UnitXP Settings
pfUI:UpdateConfig("unitframes", nil, "unitxp_font_size", "13")
pfUI:UpdateConfig("unitframes", nil, "los_indicator", "0")
pfUI:UpdateConfig("unitframes", nil, "behind_indicator", "0")
pfUI:UpdateConfig("unitframes", nil, "hide_distance_yd", "0")
pfUI:UpdateConfig("unitframes", nil, "unitxp_notify", "0")
pfUI:UpdateConfig("unitframes", nil, "track_group", "0")
+2
View File
@@ -2162,9 +2162,11 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function ()
CreateConfig(nil, T["Reactive Indicator Size"], C.unitframes, "reactive_size", nil, nil, nil, nil, nil, "vanilla" )
CreateConfig(nil, T["UnitXP Settings"], nil, nil, "header")
CreateConfig(nil, T["Font Size for all UnitXP texts"], C.unitframes, "unitxp_font_size", nil, nil, nil, nil, nil, "vanilla" )
CreateConfig(nil, T["Show Line of Sight Indicator"], C.unitframes, "los_indicator", "checkbox", nil, nil, nil, nil, "vanilla" )
CreateConfig(nil, T["Show Behind Indicator"], C.unitframes, "behind_indicator", "checkbox", nil, nil, nil, nil, "vanilla" )
CreateConfig(nil, T["Show Distance of Target"], C.unitframes, "distance_indicator", "checkbox", nil, nil, nil, nil, "vanilla" )
CreateConfig(nil, T["Hide yd characters"], C.unitframes, "hide_distance_yd", "checkbox", nil, nil, nil, nil, "vanilla" )
CreateConfig(nil, T["Hook Distance to Portrait Frame"], C.unitframes, "distance_hook_portrait", "checkbox", nil, nil, nil, nil, "vanilla" )
CreateConfig(nil, T["Enable OS Notifications"], C.unitframes, "unitxp_notify", "checkbox", nil, nil, nil, nil, "vanilla" )
end)
+7 -5
View File
@@ -15,6 +15,8 @@ pfUI:RegisterModule("unitxp", "vanilla", function ()
local h = pfUI.uf.target:GetHeight() or 30
local slot = h / 3 -- divide frame into thirds
local fontSize = tonumber(C.unitframes.unitxp_font_size) or (C.global.font_size + 2)
local suffix = (C.unitframes.hide_distance_yd == "1") and "" or " yd"
-- Behind Indicator for all units (MIDDLE)
if C.unitframes.behind_indicator == "1" and not pfUI.uf.target.behindIndicator then
@@ -23,7 +25,7 @@ pfUI:RegisterModule("unitxp", "vanilla", function ()
behindFrame:SetFrameLevel(pfUI.uf.target:GetFrameLevel() + 10)
behindFrame.text = behindFrame:CreateFontString(nil, "OVERLAY")
behindFrame.text:SetFont(pfUI.font_default, 13, "OUTLINE")
behindFrame.text:SetFont(pfUI.font_default, fontSize, "OUTLINE")
behindFrame.text:SetPoint("RIGHT", behindFrame, "RIGHT", -1, 0)
behindFrame.text:SetTextColor(0.3, 1, 0.3, 1)
behindFrame.text:SetText("BEHIND")
@@ -57,7 +59,7 @@ pfUI:RegisterModule("unitxp", "vanilla", function ()
losFrame:SetFrameLevel(pfUI.uf.target:GetFrameLevel() + 10)
losFrame.text = losFrame:CreateFontString(nil, "OVERLAY")
losFrame.text:SetFont(pfUI.font_default, 13, "OUTLINE")
losFrame.text:SetFont(pfUI.font_default, fontSize, "OUTLINE")
losFrame.text:SetPoint("RIGHT", losFrame, "RIGHT", -1, -slot)
losFrame.text:SetTextColor(1, 0.3, 0.3, 1)
losFrame.text:SetText("NO LOS")
@@ -93,7 +95,7 @@ pfUI:RegisterModule("unitxp", "vanilla", function ()
distFrame:SetFrameLevel(pfUI.uf.target:GetFrameLevel() + 10)
distFrame.text = distFrame:CreateFontString(nil, "OVERLAY")
distFrame.text:SetFont(pfUI.font_default, 13, "OUTLINE")
distFrame.text:SetFont(pfUI.font_default, fontSize, "OUTLINE")
distFrame.text:SetPoint("RIGHT", distFrame, "RIGHT", -1, slot)
distFrame.text:SetTextColor(1, 1, 1, 1)
distFrame.text:Hide()
@@ -132,7 +134,7 @@ pfUI:RegisterModule("unitxp", "vanilla", function ()
end
this.text:SetTextColor(r, g, b, 1)
this.text:SetText(string.format("%.1f yd", distance))
this.text:SetText(string.format("%.1f%s", distance, suffix))
this.text:Show()
end)
@@ -201,7 +203,7 @@ pfUI:RegisterModule("unitxp", "vanilla", function ()
end
f.text:SetTextColor(r, g, b, 1)
f.text:SetText(string.format("%.1f yd", distance))
f.text:SetText(string.format("%.1f%s", distance, suffix))
end)
end
pfUI.uf.target.distanceIndicator = pfRangeDisplay