mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-28 02:16:02 +00:00
unitframes: add option for custom portrait size
This commit is contained in:
@@ -381,11 +381,14 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("unitframes", unit, "looticon", "1")
|
||||
pfUI:UpdateConfig("unitframes", unit, "raidiconsize", "24")
|
||||
pfUI:UpdateConfig("unitframes", unit, "portrait", "bar")
|
||||
pfUI:UpdateConfig("unitframes", unit, "portraitsize", "0")
|
||||
pfUI:UpdateConfig("unitframes", unit, "bartexture", "Interface\\AddOns\\pfUI\\img\\bar")
|
||||
pfUI:UpdateConfig("unitframes", unit, "width", "200")
|
||||
pfUI:UpdateConfig("unitframes", unit, "height", "46")
|
||||
pfUI:UpdateConfig("unitframes", unit, "pheight", "10")
|
||||
pfUI:UpdateConfig("unitframes", unit, "pwidth", "-1")
|
||||
pfUI:UpdateConfig("unitframes", unit, "portraitheight", "-1")
|
||||
pfUI:UpdateConfig("unitframes", unit, "portraitwidth", "-1")
|
||||
pfUI:UpdateConfig("unitframes", unit, "panchor", "TOP")
|
||||
pfUI:UpdateConfig("unitframes", unit, "pspace", "-3")
|
||||
pfUI:UpdateConfig("unitframes", unit, "cooldown_text", "1")
|
||||
|
||||
@@ -336,10 +336,18 @@ function pfUI.uf:UpdateFrameSize()
|
||||
end
|
||||
|
||||
local portrait = 0
|
||||
local ptwidth = self.config.portraitwidth
|
||||
local ptheight = self.config.portraitheight
|
||||
|
||||
if self.config.portrait == "left" or self.config.portrait == "right" then
|
||||
if self.config.portraitsize == "0" then
|
||||
self.portrait:SetWidth(real_height)
|
||||
self.portrait:SetHeight(real_height)
|
||||
portrait = real_height + spacing + 2*default_border
|
||||
else
|
||||
self.portrait:SetWidth(ptwidth)
|
||||
self.portrait:SetHeight(ptheight)
|
||||
end
|
||||
end
|
||||
|
||||
self:SetWidth(width + portrait)
|
||||
@@ -447,6 +455,7 @@ function pfUI.uf:UpdateConfig()
|
||||
f.portrait.model:SetFrameStrata("LOW")
|
||||
f.portrait.model:SetAllPoints(f.portrait)
|
||||
|
||||
local pspacing = self.config.portraitwidth
|
||||
if f.config.portrait == "bar" then
|
||||
f.portrait:SetParent(f.hp.bar)
|
||||
f.portrait:SetAllPoints(f.hp.bar)
|
||||
@@ -463,7 +472,11 @@ function pfUI.uf:UpdateConfig()
|
||||
elseif f.config.portrait == "left" then
|
||||
f.portrait:SetParent(f)
|
||||
f.portrait:ClearAllPoints()
|
||||
if self.config.portraitsize == "0" then
|
||||
f.portrait:SetPoint("TOPLEFT", f, "TOPLEFT", 0, 0)
|
||||
else
|
||||
f.portrait:SetPoint("LEFT", f, "LEFT", -pspacing, 0)
|
||||
end
|
||||
|
||||
f.hp:ClearAllPoints()
|
||||
f.hp:SetPoint("TOPRIGHT", f, "TOPRIGHT", 0, 0)
|
||||
@@ -481,7 +494,11 @@ function pfUI.uf:UpdateConfig()
|
||||
elseif f.config.portrait == "right" then
|
||||
f.portrait:SetParent(f)
|
||||
f.portrait:ClearAllPoints()
|
||||
if self.config.portraitsize == "0" then
|
||||
f.portrait:SetPoint("TOPRIGHT", f, "TOPRIGHT", 0, 0)
|
||||
else
|
||||
f.portrait:SetPoint("RIGHT", f, "RIGHT", pspacing, 0)
|
||||
end
|
||||
|
||||
f.hp:ClearAllPoints()
|
||||
f.hp:SetPoint("TOPLEFT", f, "TOPLEFT", 0, 0)
|
||||
|
||||
Vendored
+3
@@ -525,6 +525,9 @@ pfUI_translation["deDE"] = {
|
||||
["Please enter a name of a character who should receive your whispers:"] = nil,
|
||||
["Portrait Alpha"] = nil,
|
||||
["Portrait Position"] = nil,
|
||||
["Enable Custom Portrait Size"] = nil,
|
||||
["Portrait Height"] = nil,
|
||||
["Portrait Width"] = nil,
|
||||
["Powerbar"] = nil,
|
||||
["Power Bar Anchor"] = nil,
|
||||
["Power Bar Height"] = nil,
|
||||
|
||||
Vendored
+3
@@ -525,6 +525,9 @@ pfUI_translation["enUS"] = {
|
||||
["Please enter a name of a character who should receive your whispers:"] = nil,
|
||||
["Portrait Alpha"] = nil,
|
||||
["Portrait Position"] = nil,
|
||||
["Enable Custom Portrait Size"] = nil,
|
||||
["Portrait Height"] = nil,
|
||||
["Portrait Width"] = nil,
|
||||
["Powerbar"] = nil,
|
||||
["Power Bar Anchor"] = nil,
|
||||
["Power Bar Height"] = nil,
|
||||
|
||||
Vendored
+3
@@ -525,6 +525,9 @@ pfUI_translation["esES"] = {
|
||||
["Please enter a name of a character who should receive your whispers:"] = "Mete el nombre del personaje que debe recibir tus susurros",
|
||||
["Portrait Alpha"] = "Transparencia del retrato",
|
||||
["Portrait Position"] = "Posición del retrato",
|
||||
["Enable Custom Portrait Size"] = "Habilitar tamaño de retrato personalizado",
|
||||
["Portrait Height"] = "Altura Retrato",
|
||||
["Portrait Width"] = "Ancho Retrato",
|
||||
["Powerbar"] = "Barra de poder",
|
||||
["Power Bar Anchor"] = "Ancla de la barra de poder",
|
||||
["Power Bar Height"] = "Altura de la barra de poder",
|
||||
|
||||
Vendored
+3
@@ -525,6 +525,9 @@ pfUI_translation["frFR"] = {
|
||||
["Please enter a name of a character who should receive your whispers:"] = "Entrez un nom de joueur qui pourrait recevoir vos chuchotements :",
|
||||
["Portrait Alpha"] = "Transparence du portrait",
|
||||
["Portrait Position"] = "Position du portrait",
|
||||
["Enable Custom Portrait Size"] = "Activer la dimension de portrait personnalisée",
|
||||
["Portrait Height"] = "Hauteur du portrait",
|
||||
["Portrait Width"] = "Largeur du portrait",
|
||||
["Powerbar"] = "Barre des ressources",
|
||||
["Power Bar Anchor"] = "Ancrage de la Barre des ressources",
|
||||
["Power Bar Height"] = "Taille de la barre des ressources",
|
||||
|
||||
Vendored
+3
@@ -525,6 +525,9 @@ pfUI_translation["koKR"] = {
|
||||
["Please enter a name of a character who should receive your whispers:"] = nil,
|
||||
["Portrait Alpha"] = "초상화 투명도",
|
||||
["Portrait Position"] = "초상화 위치",
|
||||
["Enable Custom Portrait Size"] = "사용자 정의 세로 크기 활성화",
|
||||
["Portrait Height"] = "세로 높이",
|
||||
["Portrait Width"] = "세로 너비",
|
||||
["Powerbar"] = nil,
|
||||
["Power Bar Anchor"] = nil,
|
||||
["Power Bar Height"] = "마나(기력)바 높이",
|
||||
|
||||
Vendored
+3
@@ -525,6 +525,9 @@ pfUI_translation["ruRU"] = {
|
||||
["Please enter a name of a character who should receive your whispers:"] = "Пожалуйста, введите имя персонажа, который должен получить ваш шепот:",
|
||||
["Portrait Alpha"] = "Прозрачность портрета",
|
||||
["Portrait Position"] = "Расположение портрета",
|
||||
["Enable Custom Portrait Size"] = "Включить нестандартный размер книжной ориентации",
|
||||
["Portrait Height"] = "Рост портрета",
|
||||
["Portrait Width"] = "Ширина портрета",
|
||||
["Powerbar"] = "Панель силы (мана, ярость, энергия, фокус)",
|
||||
["Power Bar Anchor"] = "Привязка панели силы",
|
||||
["Power Bar Height"] = "Высота панели силы",
|
||||
|
||||
Vendored
+3
@@ -525,6 +525,9 @@ pfUI_translation["zhCN"] = {
|
||||
["Please enter a name of a character who should receive your whispers:"] = "请输入一个接收你的私聊的角色的名称:",
|
||||
["Portrait Alpha"] = "人偶透明度",
|
||||
["Portrait Position"] = "人偶头像位置",
|
||||
["Enable Custom Portrait Size"] = "启用自定义人像尺寸",
|
||||
["Portrait Height"] = "纵向高度",
|
||||
["Portrait Width"] = "纵向宽度",
|
||||
["Powerbar"] = "能量(蓝)条",
|
||||
["Power Bar Anchor"] = "能量条对齐方式(以血条为锚点)",
|
||||
["Power Bar Height"] = "能量条高度",
|
||||
|
||||
Vendored
+3
@@ -525,6 +525,9 @@ pfUI_translation["zhTW"] = {
|
||||
["Please enter a name of a character who should receive your whispers:"] = nil,
|
||||
["Portrait Alpha"] = "人偶透明度",
|
||||
["Portrait Position"] = "人偶頭像位置",
|
||||
["Enable Custom Portrait Size"] = "启用自定义人像尺寸",
|
||||
["Portrait Height"] = "纵向高度",
|
||||
["Portrait Width"] = "纵向宽度",
|
||||
["Powerbar"] = "能量(藍)條",
|
||||
["Power Bar Anchor"] = "能量條對齊方式(以血條為錨點)",
|
||||
["Power Bar Height"] = "能量值高度",
|
||||
|
||||
@@ -1687,6 +1687,9 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function ()
|
||||
CreateConfig(U[c], T["Enable Aggro Glow"], C.unitframes[c], "glowaggro", "checkbox")
|
||||
CreateConfig(U[c], T["Enable Combat Glow"], C.unitframes[c], "glowcombat", "checkbox")
|
||||
CreateConfig(U[c], T["Portrait Position"], C.unitframes[c], "portrait", "dropdown", pfUI.gui.dropdowns.uf_portrait_position)
|
||||
CreateConfig(U[c], T["Enable Custom Portrait Size"], C.unitframes[c], "portraitsize", "checkbox")
|
||||
CreateConfig(U[c], T["Portrait Height"], C.unitframes[c], "portraitheight")
|
||||
CreateConfig(U[c], T["Portrait Width"], C.unitframes[c], "portraitwidth")
|
||||
CreateConfig(U[c], T["Status Bar Texture"], C.unitframes[c], "bartexture", "dropdown", pfUI.gui.dropdowns.uf_bartexture)
|
||||
CreateConfig(U[c], T["UnitFrame Spacing"], C.unitframes[c], "pspace")
|
||||
CreateConfig(U[c], T["Show PvP-Flag"], C.unitframes[c], "showPVP", "checkbox")
|
||||
|
||||
Reference in New Issue
Block a user