mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-06 05:30:00 +00:00
fonts: integrate upgrade paths
This commit is contained in:
+14
-5
@@ -29,8 +29,8 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("global", nil, "offscreen", "0")
|
||||
pfUI:UpdateConfig("global", nil, "font_default", "Myriad-Pro")
|
||||
pfUI:UpdateConfig("global", nil, "font_size", "12")
|
||||
pfUI:UpdateConfig("global", nil, "font_square", "BigNoodleTitling")
|
||||
pfUI:UpdateConfig("global", nil, "font_square_size", "12")
|
||||
pfUI:UpdateConfig("global", nil, "font_unit", "BigNoodleTitling")
|
||||
pfUI:UpdateConfig("global", nil, "font_unit_size", "12")
|
||||
|
||||
pfUI:UpdateConfig("global", nil, "font_combat", "Continuum")
|
||||
pfUI:UpdateConfig("global", nil, "force_region", "1")
|
||||
@@ -393,7 +393,7 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("bars", "shapeshift", "formfactor", "10 x 1")
|
||||
pfUI:UpdateConfig("bars", "pet", "formfactor", "10 x 1")
|
||||
|
||||
pfUI:UpdateConfig("panel", nil, "use_unitfonts", "1")
|
||||
pfUI:UpdateConfig("panel", nil, "use_unitfonts", "0")
|
||||
pfUI:UpdateConfig("panel", "left", "left", "guild")
|
||||
pfUI:UpdateConfig("panel", "left", "center", "durability")
|
||||
pfUI:UpdateConfig("panel", "left", "right", "friends")
|
||||
@@ -406,7 +406,7 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("castbar", "player", "hide_blizz", "1")
|
||||
pfUI:UpdateConfig("castbar", "player", "hide_pfui", "0")
|
||||
pfUI:UpdateConfig("castbar", "target", "hide_pfui", "0")
|
||||
pfUI:UpdateConfig("castbar", nil, "use_unitfonts", "1")
|
||||
pfUI:UpdateConfig("castbar", nil, "use_unitfonts", "0")
|
||||
|
||||
pfUI:UpdateConfig("tooltip", nil, "position", "bottom")
|
||||
pfUI:UpdateConfig("tooltip", nil, "extguild", "1")
|
||||
@@ -439,7 +439,7 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("chat", "global", "fadeout", "0")
|
||||
pfUI:UpdateConfig("chat", "global", "fadetime", "300")
|
||||
|
||||
pfUI:UpdateConfig("nameplates", nil, "use_unitfonts", "1")
|
||||
pfUI:UpdateConfig("nameplates", nil, "use_unitfonts", "0")
|
||||
pfUI:UpdateConfig("nameplates", nil, "showcastbar", "1")
|
||||
pfUI:UpdateConfig("nameplates", nil, "spellname", "0")
|
||||
pfUI:UpdateConfig("nameplates", nil, "showdebuffs", "0")
|
||||
@@ -540,5 +540,14 @@ function pfUI:MigrateConfig()
|
||||
end
|
||||
end
|
||||
|
||||
-- migrating to new fontnames (> 2.6)
|
||||
if major <= 2 and minor <= 6 then
|
||||
-- migrate font_combat
|
||||
if pfUI_config.global.font_square then
|
||||
pfUI_config.global.font_unit = pfUI_config.global.font_square
|
||||
pfUI_config.global.font_square = nil
|
||||
end
|
||||
end
|
||||
|
||||
pfUI_config.version = pfUI.version.string
|
||||
end
|
||||
|
||||
+7
-7
@@ -90,7 +90,7 @@ function pfUI.uf:CreateUnitFrame(unit, id, config, tick)
|
||||
f.power.bar:SetMinMaxValues(0, 100)
|
||||
|
||||
f.leftText = f:CreateFontString("Status", "OVERLAY", "GameFontNormalSmall")
|
||||
f.leftText:SetFont(pfUI.font_square, C.global.font_square_size, "OUTLINE")
|
||||
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)
|
||||
@@ -99,7 +99,7 @@ function pfUI.uf:CreateUnitFrame(unit, id, config, tick)
|
||||
f.leftText:SetPoint("BOTTOMRIGHT",f.hp.bar, "BOTTOMRIGHT", -2*default_border, 0)
|
||||
|
||||
f.rightText = f:CreateFontString("Status", "OVERLAY", "GameFontNormalSmall")
|
||||
f.rightText:SetFont(pfUI.font_square, C.global.font_square_size, "OUTLINE")
|
||||
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)
|
||||
@@ -108,7 +108,7 @@ function pfUI.uf:CreateUnitFrame(unit, id, config, tick)
|
||||
f.rightText:SetPoint("BOTTOMRIGHT",f.hp.bar, "BOTTOMRIGHT", -2*default_border, 0)
|
||||
|
||||
f.centerText = f:CreateFontString("Status", "OVERLAY", "GameFontNormalSmall")
|
||||
f.centerText:SetFont(pfUI.font_square, C.global.font_square_size, "OUTLINE")
|
||||
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)
|
||||
@@ -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_square_size, "OUTLINE")
|
||||
f.buffs[i].stacks:SetFont(pfUI.font_unit, C.global.font_unit_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_square_size, "OUTLINE")
|
||||
f.buffs[i].cd:SetFont(pfUI.font_unit, C.global.font_unit_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_square_size, "OUTLINE")
|
||||
f.debuffs[i].stacks:SetFont(pfUI.font_unit, C.global.font_unit_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_square_size, "OUTLINE")
|
||||
f.debuffs[i].cd:SetFont(pfUI.font_unit, C.global.font_unit_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)
|
||||
|
||||
Reference in New Issue
Block a user