mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-07 14:10:01 +00:00
unitframes: health & power texts
This commit is contained in:
+78
-30
@@ -114,13 +114,16 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("unitframes", "player", "debuff_indicator", "0")
|
||||
pfUI:UpdateConfig("unitframes", "player", "clickcast", "0")
|
||||
pfUI:UpdateConfig("unitframes", "player", "faderange", "0")
|
||||
pfUI:UpdateConfig("unitframes", "player", "txtleft", "unit")
|
||||
pfUI:UpdateConfig("unitframes", "player", "txtcenter", "none")
|
||||
pfUI:UpdateConfig("unitframes", "player", "txtright", "healthdyn")
|
||||
pfUI:UpdateConfig("unitframes", "player", "healthcolor", "1")
|
||||
pfUI:UpdateConfig("unitframes", "player", "powercolor", "1")
|
||||
pfUI:UpdateConfig("unitframes", "player", "levelcolor", "1")
|
||||
pfUI:UpdateConfig("unitframes", "player", "classcolor", "1")
|
||||
pfUI:UpdateConfig("unitframes", "player", "txthpleft", "unit")
|
||||
pfUI:UpdateConfig("unitframes", "player", "txthpcenter", "none")
|
||||
pfUI:UpdateConfig("unitframes", "player", "txthpright", "healthdyn")
|
||||
pfUI:UpdateConfig("unitframes", "player", "txtpowerleft", "none")
|
||||
pfUI:UpdateConfig("unitframes", "player", "txtpowercenter", "none")
|
||||
pfUI:UpdateConfig("unitframes", "player", "txtpowerright", "none")
|
||||
|
||||
pfUI:UpdateConfig("unitframes", "player", "showPVPMinimap", "0")
|
||||
pfUI:UpdateConfig("unitframes", "player", "showPVP", "0")
|
||||
@@ -145,14 +148,17 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("unitframes", "target", "debuff_indicator", "0")
|
||||
pfUI:UpdateConfig("unitframes", "target", "clickcast", "0")
|
||||
pfUI:UpdateConfig("unitframes", "target", "faderange", "0")
|
||||
pfUI:UpdateConfig("unitframes", "target", "txtleft", "unit")
|
||||
pfUI:UpdateConfig("unitframes", "target", "txtcenter", "none")
|
||||
pfUI:UpdateConfig("unitframes", "target", "txtright", "healthdyn")
|
||||
pfUI:UpdateConfig("unitframes", "target", "healthcolor", "1")
|
||||
pfUI:UpdateConfig("unitframes", "target", "powercolor", "1")
|
||||
pfUI:UpdateConfig("unitframes", "target", "levelcolor", "1")
|
||||
pfUI:UpdateConfig("unitframes", "target", "classcolor", "1")
|
||||
pfUI:UpdateConfig("unitframes", "target", "animation", "0")
|
||||
pfUI:UpdateConfig("unitframes", "target", "txthpleft", "unit")
|
||||
pfUI:UpdateConfig("unitframes", "target", "txthpcenter", "none")
|
||||
pfUI:UpdateConfig("unitframes", "target", "txthpright", "healthdyn")
|
||||
pfUI:UpdateConfig("unitframes", "target", "txtpowerleft", "none")
|
||||
pfUI:UpdateConfig("unitframes", "target", "txtpowercenter", "none")
|
||||
pfUI:UpdateConfig("unitframes", "target", "txtpowerright", "none")
|
||||
|
||||
pfUI:UpdateConfig("unitframes", "focus", "visible", "1")
|
||||
pfUI:UpdateConfig("unitframes", "focus", "portrait", "bar")
|
||||
@@ -173,13 +179,16 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("unitframes", "focus", "debuff_indicator", "0")
|
||||
pfUI:UpdateConfig("unitframes", "focus", "clickcast", "0")
|
||||
pfUI:UpdateConfig("unitframes", "focus", "faderange", "0")
|
||||
pfUI:UpdateConfig("unitframes", "focus", "txtleft", "unit")
|
||||
pfUI:UpdateConfig("unitframes", "focus", "txtcenter", "none")
|
||||
pfUI:UpdateConfig("unitframes", "focus", "txtright", "healthdyn")
|
||||
pfUI:UpdateConfig("unitframes", "focus", "healthcolor", "1")
|
||||
pfUI:UpdateConfig("unitframes", "focus", "powercolor", "1")
|
||||
pfUI:UpdateConfig("unitframes", "focus", "levelcolor", "1")
|
||||
pfUI:UpdateConfig("unitframes", "focus", "classcolor", "1")
|
||||
pfUI:UpdateConfig("unitframes", "focus", "txthpleft", "unit")
|
||||
pfUI:UpdateConfig("unitframes", "focus", "txthpcenter", "none")
|
||||
pfUI:UpdateConfig("unitframes", "focus", "txthpright", "healthdyn")
|
||||
pfUI:UpdateConfig("unitframes", "focus", "txtpowerleft", "none")
|
||||
pfUI:UpdateConfig("unitframes", "focus", "txtpowercenter", "none")
|
||||
pfUI:UpdateConfig("unitframes", "focus", "txtpowerright", "none")
|
||||
|
||||
pfUI:UpdateConfig("unitframes", "group", "visible", "1")
|
||||
pfUI:UpdateConfig("unitframes", "group", "portrait", "off")
|
||||
@@ -200,14 +209,17 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("unitframes", "group", "debuff_indicator", "1")
|
||||
pfUI:UpdateConfig("unitframes", "group", "clickcast", "0")
|
||||
pfUI:UpdateConfig("unitframes", "group", "faderange", "1")
|
||||
pfUI:UpdateConfig("unitframes", "group", "txtleft", "unit")
|
||||
pfUI:UpdateConfig("unitframes", "group", "txtcenter", "none")
|
||||
pfUI:UpdateConfig("unitframes", "group", "txtright", "healthmiss")
|
||||
pfUI:UpdateConfig("unitframes", "group", "healthcolor", "1")
|
||||
pfUI:UpdateConfig("unitframes", "group", "powercolor", "1")
|
||||
pfUI:UpdateConfig("unitframes", "group", "levelcolor", "1")
|
||||
pfUI:UpdateConfig("unitframes", "group", "classcolor", "1")
|
||||
pfUI:UpdateConfig("unitframes", "group", "hide_in_raid", "0")
|
||||
pfUI:UpdateConfig("unitframes", "group", "txthpleft", "unit")
|
||||
pfUI:UpdateConfig("unitframes", "group", "txthpcenter", "none")
|
||||
pfUI:UpdateConfig("unitframes", "group", "txthpright", "healthmiss")
|
||||
pfUI:UpdateConfig("unitframes", "group", "txtpowerleft", "none")
|
||||
pfUI:UpdateConfig("unitframes", "group", "txtpowercenter", "none")
|
||||
pfUI:UpdateConfig("unitframes", "group", "txtpowerright", "none")
|
||||
|
||||
pfUI:UpdateConfig("unitframes", "grouptarget", "visible", "1")
|
||||
pfUI:UpdateConfig("unitframes", "grouptarget", "portrait", "off")
|
||||
@@ -228,13 +240,16 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("unitframes", "grouptarget", "debuff_indicator", "0")
|
||||
pfUI:UpdateConfig("unitframes", "grouptarget", "clickcast", "0")
|
||||
pfUI:UpdateConfig("unitframes", "grouptarget", "faderange", "1")
|
||||
pfUI:UpdateConfig("unitframes", "grouptarget", "txtleft", "unit")
|
||||
pfUI:UpdateConfig("unitframes", "grouptarget", "txtcenter", "none")
|
||||
pfUI:UpdateConfig("unitframes", "grouptarget", "txtright", "healthperc")
|
||||
pfUI:UpdateConfig("unitframes", "grouptarget", "healthcolor", "1")
|
||||
pfUI:UpdateConfig("unitframes", "grouptarget", "powercolor", "1")
|
||||
pfUI:UpdateConfig("unitframes", "grouptarget", "levelcolor", "1")
|
||||
pfUI:UpdateConfig("unitframes", "grouptarget", "classcolor", "1")
|
||||
pfUI:UpdateConfig("unitframes", "grouptarget", "txthpleft", "unit")
|
||||
pfUI:UpdateConfig("unitframes", "grouptarget", "txthpcenter", "none")
|
||||
pfUI:UpdateConfig("unitframes", "grouptarget", "txthpright", "healthperc")
|
||||
pfUI:UpdateConfig("unitframes", "grouptarget", "txtpowerleft", "none")
|
||||
pfUI:UpdateConfig("unitframes", "grouptarget", "txtpowercenter", "none")
|
||||
pfUI:UpdateConfig("unitframes", "grouptarget", "txtpowerright", "none")
|
||||
|
||||
pfUI:UpdateConfig("unitframes", "grouppet", "visible", "1")
|
||||
pfUI:UpdateConfig("unitframes", "grouppet", "portrait", "off")
|
||||
@@ -255,13 +270,16 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("unitframes", "grouppet", "debuff_indicator", "0")
|
||||
pfUI:UpdateConfig("unitframes", "grouppet", "clickcast", "0")
|
||||
pfUI:UpdateConfig("unitframes", "grouppet", "faderange", "1")
|
||||
pfUI:UpdateConfig("unitframes", "grouppet", "txtleft", "unit")
|
||||
pfUI:UpdateConfig("unitframes", "grouppet", "txtcenter", "none")
|
||||
pfUI:UpdateConfig("unitframes", "grouppet", "txtright", "healthperc")
|
||||
pfUI:UpdateConfig("unitframes", "grouppet", "healthcolor", "1")
|
||||
pfUI:UpdateConfig("unitframes", "grouppet", "powercolor", "1")
|
||||
pfUI:UpdateConfig("unitframes", "grouppet", "levelcolor", "1")
|
||||
pfUI:UpdateConfig("unitframes", "grouppet", "classcolor", "1")
|
||||
pfUI:UpdateConfig("unitframes", "grouppet", "txthpleft", "unit")
|
||||
pfUI:UpdateConfig("unitframes", "grouppet", "txthpcenter", "none")
|
||||
pfUI:UpdateConfig("unitframes", "grouppet", "txthpright", "healthperc")
|
||||
pfUI:UpdateConfig("unitframes", "grouppet", "txtpowerleft", "none")
|
||||
pfUI:UpdateConfig("unitframes", "grouppet", "txtpowercenter", "none")
|
||||
pfUI:UpdateConfig("unitframes", "grouppet", "txtpowerright", "none")
|
||||
|
||||
pfUI:UpdateConfig("unitframes", "raid", "visible", "1")
|
||||
pfUI:UpdateConfig("unitframes", "raid", "portrait", "off")
|
||||
@@ -282,13 +300,16 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("unitframes", "raid", "debuff_indicator", "1")
|
||||
pfUI:UpdateConfig("unitframes", "raid", "clickcast", "0")
|
||||
pfUI:UpdateConfig("unitframes", "raid", "faderange", "1")
|
||||
pfUI:UpdateConfig("unitframes", "raid", "txtleft", "name")
|
||||
pfUI:UpdateConfig("unitframes", "raid", "txtcenter", "none")
|
||||
pfUI:UpdateConfig("unitframes", "raid", "txtright", "healthmiss")
|
||||
pfUI:UpdateConfig("unitframes", "raid", "healthcolor", "1")
|
||||
pfUI:UpdateConfig("unitframes", "raid", "powercolor", "1")
|
||||
pfUI:UpdateConfig("unitframes", "raid", "levelcolor", "1")
|
||||
pfUI:UpdateConfig("unitframes", "raid", "classcolor", "1")
|
||||
pfUI:UpdateConfig("unitframes", "raid", "txthpleft", "name")
|
||||
pfUI:UpdateConfig("unitframes", "raid", "txthpcenter", "none")
|
||||
pfUI:UpdateConfig("unitframes", "raid", "txthpright", "healthmiss")
|
||||
pfUI:UpdateConfig("unitframes", "raid", "txtpowerleft", "none")
|
||||
pfUI:UpdateConfig("unitframes", "raid", "txtpowercenter", "none")
|
||||
pfUI:UpdateConfig("unitframes", "raid", "txtpowerright", "none")
|
||||
|
||||
pfUI:UpdateConfig("unitframes", "ttarget", "visible", "1")
|
||||
pfUI:UpdateConfig("unitframes", "ttarget", "portrait", "bar")
|
||||
@@ -309,13 +330,16 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("unitframes", "ttarget", "debuff_indicator", "0")
|
||||
pfUI:UpdateConfig("unitframes", "ttarget", "clickcast", "0")
|
||||
pfUI:UpdateConfig("unitframes", "ttarget", "faderange", "0")
|
||||
pfUI:UpdateConfig("unitframes", "ttarget", "txtleft", "none")
|
||||
pfUI:UpdateConfig("unitframes", "ttarget", "txtcenter", "name")
|
||||
pfUI:UpdateConfig("unitframes", "ttarget", "txtright", "none")
|
||||
pfUI:UpdateConfig("unitframes", "ttarget", "healthcolor", "1")
|
||||
pfUI:UpdateConfig("unitframes", "ttarget", "powercolor", "1")
|
||||
pfUI:UpdateConfig("unitframes", "ttarget", "levelcolor", "1")
|
||||
pfUI:UpdateConfig("unitframes", "ttarget", "classcolor", "1")
|
||||
pfUI:UpdateConfig("unitframes", "ttarget", "txthpleft", "none")
|
||||
pfUI:UpdateConfig("unitframes", "ttarget", "txthpcenter", "name")
|
||||
pfUI:UpdateConfig("unitframes", "ttarget", "txthpright", "none")
|
||||
pfUI:UpdateConfig("unitframes", "ttarget", "txtpowerleft", "none")
|
||||
pfUI:UpdateConfig("unitframes", "ttarget", "txtpowercenter", "none")
|
||||
pfUI:UpdateConfig("unitframes", "ttarget", "txtpowerright", "none")
|
||||
|
||||
pfUI:UpdateConfig("unitframes", "pet", "visible", "1")
|
||||
pfUI:UpdateConfig("unitframes", "pet", "portrait", "bar")
|
||||
@@ -336,13 +360,16 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("unitframes", "pet", "debuff_indicator", "0")
|
||||
pfUI:UpdateConfig("unitframes", "pet", "clickcast", "0")
|
||||
pfUI:UpdateConfig("unitframes", "pet", "faderange", "0")
|
||||
pfUI:UpdateConfig("unitframes", "pet", "txtleft", "none")
|
||||
pfUI:UpdateConfig("unitframes", "pet", "txtcenter", "name")
|
||||
pfUI:UpdateConfig("unitframes", "pet", "txtright", "none")
|
||||
pfUI:UpdateConfig("unitframes", "pet", "healthcolor", "1")
|
||||
pfUI:UpdateConfig("unitframes", "pet", "powercolor", "1")
|
||||
pfUI:UpdateConfig("unitframes", "pet", "levelcolor", "1")
|
||||
pfUI:UpdateConfig("unitframes", "pet", "classcolor", "1")
|
||||
pfUI:UpdateConfig("unitframes", "pet", "txthpleft", "none")
|
||||
pfUI:UpdateConfig("unitframes", "pet", "txthpcenter", "name")
|
||||
pfUI:UpdateConfig("unitframes", "pet", "txthpright", "none")
|
||||
pfUI:UpdateConfig("unitframes", "pet", "txtpowerleft", "none")
|
||||
pfUI:UpdateConfig("unitframes", "pet", "txtpowercenter", "none")
|
||||
pfUI:UpdateConfig("unitframes", "pet", "txtpowerright", "none")
|
||||
|
||||
pfUI:UpdateConfig("unitframes", "fallback", "visible", "1")
|
||||
pfUI:UpdateConfig("unitframes", "fallback", "portrait", "bar")
|
||||
@@ -363,13 +390,16 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("unitframes", "fallback", "debuff_indicator", "0")
|
||||
pfUI:UpdateConfig("unitframes", "fallback", "clickcast", "0")
|
||||
pfUI:UpdateConfig("unitframes", "fallback", "faderange", "0")
|
||||
pfUI:UpdateConfig("unitframes", "fallback", "txtleft", "unit")
|
||||
pfUI:UpdateConfig("unitframes", "fallback", "txtcenter", "none")
|
||||
pfUI:UpdateConfig("unitframes", "fallback", "txtright", "healthdyn")
|
||||
pfUI:UpdateConfig("unitframes", "fallback", "healthcolor", "1")
|
||||
pfUI:UpdateConfig("unitframes", "fallback", "powercolor", "1")
|
||||
pfUI:UpdateConfig("unitframes", "fallback", "levelcolor", "1")
|
||||
pfUI:UpdateConfig("unitframes", "fallback", "classcolor", "1")
|
||||
pfUI:UpdateConfig("unitframes", "fallback", "txthpleft", "unit")
|
||||
pfUI:UpdateConfig("unitframes", "fallback", "txthpcenter", "none")
|
||||
pfUI:UpdateConfig("unitframes", "fallback", "txthpright", "healthdyn")
|
||||
pfUI:UpdateConfig("unitframes", "fallback", "txtpowerleft", "none")
|
||||
pfUI:UpdateConfig("unitframes", "fallback", "txtpowercenter", "none")
|
||||
pfUI:UpdateConfig("unitframes", "fallback", "txtpowerright", "none")
|
||||
|
||||
pfUI:UpdateConfig("bars", nil, "icon_size", "20")
|
||||
pfUI:UpdateConfig("bars", nil, "background", "1")
|
||||
@@ -570,6 +600,24 @@ function pfUI:MigrateConfig()
|
||||
if not strfind(pfUI_config.global.font_combat, "\\") then
|
||||
pfUI_config.global.font_combat = "Interface\\AddOns\\pfUI\\fonts\\" .. pfUI_config.global.font_combat .. ".ttf"
|
||||
end
|
||||
|
||||
-- migrate unitframe texts
|
||||
local unitframes = { "player", "target", "focus", "group", "grouptarget", "grouppet", "raid", "ttarget", "pet", "fallback" }
|
||||
|
||||
for _, unitframe in pairs(unitframes) do
|
||||
if pfUI_config.unitframes[unitframe].txtleft then
|
||||
pfUI_config.unitframes[unitframe].txthpleft = pfUI_config.unitframes[unitframe].txtleft
|
||||
pfUI_config.unitframes[unitframe].txtleft = nil
|
||||
end
|
||||
if pfUI_config.unitframes[unitframe].txtcenter then
|
||||
pfUI_config.unitframes[unitframe].txthpcenter = pfUI_config.unitframes[unitframe].txtcenter
|
||||
pfUI_config.unitframes[unitframe].txtcenter = nil
|
||||
end
|
||||
if pfUI_config.unitframes[unitframe].txtright then
|
||||
pfUI_config.unitframes[unitframe].txthpright = pfUI_config.unitframes[unitframe].txtright
|
||||
pfUI_config.unitframes[unitframe].txtright = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
pfUI_config.version = pfUI.version.string
|
||||
|
||||
+58
-27
@@ -89,32 +89,59 @@ function pfUI.uf:CreateUnitFrame(unit, id, config, tick)
|
||||
f.power.bar:SetAllPoints(f.power)
|
||||
f.power.bar:SetMinMaxValues(0, 100)
|
||||
|
||||
f.leftText = f:CreateFontString("Status", "OVERLAY", "GameFontNormalSmall")
|
||||
f.leftText:SetFont(pfUI.font_unit, C.global.font_unit_size, "OUTLINE")
|
||||
f.leftText:SetJustifyH("LEFT")
|
||||
f.leftText:SetFontObject(GameFontWhite)
|
||||
f.leftText:SetParent(f.hp.bar)
|
||||
f.leftText:ClearAllPoints()
|
||||
f.leftText:SetPoint("TOPLEFT",f.hp.bar, "TOPLEFT", 2*default_border, 1)
|
||||
f.leftText:SetPoint("BOTTOMRIGHT",f.hp.bar, "BOTTOMRIGHT", -2*default_border, 0)
|
||||
f.hpLeftText = f:CreateFontString("Status", "OVERLAY", "GameFontNormalSmall")
|
||||
f.hpLeftText:SetFont(pfUI.font_unit, C.global.font_unit_size, "OUTLINE")
|
||||
f.hpLeftText:SetJustifyH("LEFT")
|
||||
f.hpLeftText:SetFontObject(GameFontWhite)
|
||||
f.hpLeftText:SetParent(f.hp.bar)
|
||||
f.hpLeftText:ClearAllPoints()
|
||||
f.hpLeftText:SetPoint("TOPLEFT",f.hp.bar, "TOPLEFT", 2*default_border, 1)
|
||||
f.hpLeftText:SetPoint("BOTTOMRIGHT",f.hp.bar, "BOTTOMRIGHT", -2*default_border, 0)
|
||||
|
||||
f.rightText = f:CreateFontString("Status", "OVERLAY", "GameFontNormalSmall")
|
||||
f.rightText:SetFont(pfUI.font_unit, C.global.font_unit_size, "OUTLINE")
|
||||
f.rightText:SetJustifyH("RIGHT")
|
||||
f.rightText:SetFontObject(GameFontWhite)
|
||||
f.rightText:SetParent(f.hp.bar)
|
||||
f.rightText:ClearAllPoints()
|
||||
f.rightText:SetPoint("TOPLEFT",f.hp.bar, "TOPLEFT", 2*default_border, 1)
|
||||
f.rightText:SetPoint("BOTTOMRIGHT",f.hp.bar, "BOTTOMRIGHT", -2*default_border, 0)
|
||||
f.hpRightText = f:CreateFontString("Status", "OVERLAY", "GameFontNormalSmall")
|
||||
f.hpRightText:SetFont(pfUI.font_unit, C.global.font_unit_size, "OUTLINE")
|
||||
f.hpRightText:SetJustifyH("RIGHT")
|
||||
f.hpRightText:SetFontObject(GameFontWhite)
|
||||
f.hpRightText:SetParent(f.hp.bar)
|
||||
f.hpRightText:ClearAllPoints()
|
||||
f.hpRightText:SetPoint("TOPLEFT",f.hp.bar, "TOPLEFT", 2*default_border, 1)
|
||||
f.hpRightText:SetPoint("BOTTOMRIGHT",f.hp.bar, "BOTTOMRIGHT", -2*default_border, 0)
|
||||
|
||||
f.centerText = f:CreateFontString("Status", "OVERLAY", "GameFontNormalSmall")
|
||||
f.centerText:SetFont(pfUI.font_unit, C.global.font_unit_size, "OUTLINE")
|
||||
f.centerText:SetJustifyH("CENTER")
|
||||
f.centerText:SetFontObject(GameFontWhite)
|
||||
f.centerText:SetParent(f.hp.bar)
|
||||
f.centerText:ClearAllPoints()
|
||||
f.centerText:SetPoint("TOPLEFT",f.hp.bar, "TOPLEFT", 2*default_border, 1)
|
||||
f.centerText:SetPoint("BOTTOMRIGHT",f.hp.bar, "BOTTOMRIGHT", -2*default_border, 0)
|
||||
f.hpCenterText = f:CreateFontString("Status", "OVERLAY", "GameFontNormalSmall")
|
||||
f.hpCenterText:SetFont(pfUI.font_unit, C.global.font_unit_size, "OUTLINE")
|
||||
f.hpCenterText:SetJustifyH("CENTER")
|
||||
f.hpCenterText:SetFontObject(GameFontWhite)
|
||||
f.hpCenterText:SetParent(f.hp.bar)
|
||||
f.hpCenterText:ClearAllPoints()
|
||||
f.hpCenterText:SetPoint("TOPLEFT",f.hp.bar, "TOPLEFT", 2*default_border, 1)
|
||||
f.hpCenterText:SetPoint("BOTTOMRIGHT",f.hp.bar, "BOTTOMRIGHT", -2*default_border, 0)
|
||||
|
||||
f.powerLeftText = f:CreateFontString("Status", "OVERLAY", "GameFontNormalSmall")
|
||||
f.powerLeftText:SetFont(pfUI.font_unit, C.global.font_unit_size, "OUTLINE")
|
||||
f.powerLeftText:SetJustifyH("LEFT")
|
||||
f.powerLeftText:SetFontObject(GameFontWhite)
|
||||
f.powerLeftText:SetParent(f.power.bar)
|
||||
f.powerLeftText:ClearAllPoints()
|
||||
f.powerLeftText:SetPoint("TOPLEFT",f.power.bar, "TOPLEFT", 2*default_border, 1)
|
||||
f.powerLeftText:SetPoint("BOTTOMRIGHT",f.power.bar, "BOTTOMRIGHT", -2*default_border, 0)
|
||||
|
||||
f.powerRightText = f:CreateFontString("Status", "OVERLAY", "GameFontNormalSmall")
|
||||
f.powerRightText:SetFont(pfUI.font_unit, C.global.font_unit_size, "OUTLINE")
|
||||
f.powerRightText:SetJustifyH("RIGHT")
|
||||
f.powerRightText:SetFontObject(GameFontWhite)
|
||||
f.powerRightText:SetParent(f.power.bar)
|
||||
f.powerRightText:ClearAllPoints()
|
||||
f.powerRightText:SetPoint("TOPLEFT",f.power.bar, "TOPLEFT", 2*default_border, 1)
|
||||
f.powerRightText:SetPoint("BOTTOMRIGHT",f.power.bar, "BOTTOMRIGHT", -2*default_border, 0)
|
||||
|
||||
f.powerCenterText = f:CreateFontString("Status", "OVERLAY", "GameFontNormalSmall")
|
||||
f.powerCenterText:SetFont(pfUI.font_unit, C.global.font_unit_size, "OUTLINE")
|
||||
f.powerCenterText:SetJustifyH("CENTER")
|
||||
f.powerCenterText:SetFontObject(GameFontWhite)
|
||||
f.powerCenterText:SetParent(f.power.bar)
|
||||
f.powerCenterText:ClearAllPoints()
|
||||
f.powerCenterText:SetPoint("TOPLEFT",f.power.bar, "TOPLEFT", 2*default_border, 1)
|
||||
f.powerCenterText:SetPoint("BOTTOMRIGHT",f.power.bar, "BOTTOMRIGHT", -2*default_border, 0)
|
||||
|
||||
f:RegisterForClicks('LeftButtonUp', 'RightButtonUp',
|
||||
'MiddleButtonUp', 'Button4Up', 'Button5Up')
|
||||
@@ -811,9 +838,13 @@ function pfUI.uf:RefreshUnit(unit, component)
|
||||
unit.power.bar:SetStatusBarColor(pr, pg, pb)
|
||||
|
||||
if UnitName(unit.label..unit.id) then
|
||||
unit.leftText:SetText(pfUI.uf:GetStatusValue(unit, "left"))
|
||||
unit.centerText:SetText(pfUI.uf:GetStatusValue(unit, "center"))
|
||||
unit.rightText:SetText(pfUI.uf:GetStatusValue(unit, "right"))
|
||||
unit.hpLeftText:SetText(pfUI.uf:GetStatusValue(unit, "hpleft"))
|
||||
unit.hpCenterText:SetText(pfUI.uf:GetStatusValue(unit, "hpcenter"))
|
||||
unit.hpRightText:SetText(pfUI.uf:GetStatusValue(unit, "hpright"))
|
||||
|
||||
unit.powerLeftText:SetText(pfUI.uf:GetStatusValue(unit, "powerleft"))
|
||||
unit.powerCenterText:SetText(pfUI.uf:GetStatusValue(unit, "powercenter"))
|
||||
unit.powerRightText:SetText(pfUI.uf:GetStatusValue(unit, "powerright"))
|
||||
|
||||
if UnitIsTapped(unit.label .. unit.id) and not UnitIsTappedByPlayer(unit.label .. unit.id) then
|
||||
unit.hp.bar:SetStatusBarColor(.5,.5,.5,.5)
|
||||
|
||||
Reference in New Issue
Block a user