fonts: add option to change unit fontsize

This commit is contained in:
shagu
2017-06-07 18:51:26 +02:00
parent 0673322231
commit 7d77a2fdf0
4 changed files with 19 additions and 16 deletions
+10 -10
View File
@@ -89,8 +89,8 @@ 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", "GameFontNormal")
f.leftText:SetFont(pfUI.font_square, C.global.font_size, "OUTLINE")
f.leftText = f:CreateFontString("Status", "OVERLAY", "GameFontNormalSmall")
f.leftText:SetFont(pfUI.font_square, C.global.font_square_size, "OUTLINE")
f.leftText:SetJustifyH("LEFT")
f.leftText:SetFontObject(GameFontWhite)
f.leftText:SetParent(f.hp.bar)
@@ -98,8 +98,8 @@ function pfUI.uf:CreateUnitFrame(unit, id, config, tick)
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.rightText = f:CreateFontString("Status", "OVERLAY", "GameFontNormal")
f.rightText:SetFont(pfUI.font_square, C.global.font_size, "OUTLINE")
f.rightText = f:CreateFontString("Status", "OVERLAY", "GameFontNormalSmall")
f.rightText:SetFont(pfUI.font_square, C.global.font_square_size, "OUTLINE")
f.rightText:SetJustifyH("RIGHT")
f.rightText:SetFontObject(GameFontWhite)
f.rightText:SetParent(f.hp.bar)
@@ -107,8 +107,8 @@ function pfUI.uf:CreateUnitFrame(unit, id, config, tick)
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.centerText = f:CreateFontString("Status", "OVERLAY", "GameFontNormal")
f.centerText:SetFont(pfUI.font_square, C.global.font_size, "OUTLINE")
f.centerText = f:CreateFontString("Status", "OVERLAY", "GameFontNormalSmall")
f.centerText:SetFont(pfUI.font_square, C.global.font_square_size, "OUTLINE")
f.centerText:SetJustifyH("CENTER")
f.centerText:SetFontObject(GameFontWhite)
f.centerText:SetParent(f.hp.bar)
@@ -346,14 +346,14 @@ function pfUI.uf:CreateUnitFrame(unit, id, config, tick)
f.buffs[i]:SetID(i)
f.buffs[i].stacks = f.buffs[i]:CreateFontString(nil, "OVERLAY", f.buffs[i])
f.buffs[i].stacks:SetFont(pfUI.font_square, C.global.font_size, "OUTLINE")
f.buffs[i].stacks:SetFont(pfUI.font_square, C.global.font_square_size, "OUTLINE")
f.buffs[i].stacks:SetPoint("BOTTOMRIGHT", f.buffs[i], 2, -2)
f.buffs[i].stacks:SetJustifyH("LEFT")
f.buffs[i].stacks:SetShadowColor(0, 0, 0)
f.buffs[i].stacks:SetShadowOffset(0.8, -0.8)
f.buffs[i].stacks:SetTextColor(1,1,.5)
f.buffs[i].cd = f.buffs[i]:CreateFontString(nil, "OVERLAY", f.buffs[i])
f.buffs[i].cd:SetFont(pfUI.font_square, C.global.font_size, "OUTLINE")
f.buffs[i].cd:SetFont(pfUI.font_square, C.global.font_square_size, "OUTLINE")
f.buffs[i].cd:SetPoint("CENTER", f.buffs[i], 0, 0)
f.buffs[i].cd:SetJustifyH("LEFT")
f.buffs[i].cd:SetShadowColor(0, 0, 0)
@@ -434,14 +434,14 @@ function pfUI.uf:CreateUnitFrame(unit, id, config, tick)
f.debuffs[i] = CreateFrame("Button", "pfUI" .. f.fname .. "Debuff" .. i, f)
f.debuffs[i]:SetID(i)
f.debuffs[i].stacks = f.debuffs[i]:CreateFontString(nil, "OVERLAY", f.debuffs[i])
f.debuffs[i].stacks:SetFont(pfUI.font_square, C.global.font_size, "OUTLINE")
f.debuffs[i].stacks:SetFont(pfUI.font_square, C.global.font_square_size, "OUTLINE")
f.debuffs[i].stacks:SetPoint("BOTTOMRIGHT", f.debuffs[i], 2, -2)
f.debuffs[i].stacks:SetJustifyH("LEFT")
f.debuffs[i].stacks:SetShadowColor(0, 0, 0)
f.debuffs[i].stacks:SetShadowOffset(0.8, -0.8)
f.debuffs[i].stacks:SetTextColor(1,1,.5)
f.debuffs[i].cd = f.debuffs[i]:CreateFontString(nil, "OVERLAY", f.debuffs[i])
f.debuffs[i].cd:SetFont(pfUI.font_square, C.global.font_size, "OUTLINE")
f.debuffs[i].cd:SetFont(pfUI.font_square, C.global.font_square_size, "OUTLINE")
f.debuffs[i].cd:SetPoint("CENTER", f.debuffs[i], 0, 0)
f.debuffs[i].cd:SetJustifyH("LEFT")
f.debuffs[i].cd:SetShadowColor(0, 0, 0)