mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-27 01:46:03 +00:00
config: migrate to new font layout
This commit is contained in:
+25
-5
@@ -27,12 +27,13 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("global", nil, "profile", "default")
|
||||
pfUI:UpdateConfig("global", nil, "pixelperfect", "0")
|
||||
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_unit", "BigNoodleTitling")
|
||||
pfUI:UpdateConfig("global", nil, "font_unit_size", "12")
|
||||
|
||||
pfUI:UpdateConfig("global", nil, "font_combat", "Continuum")
|
||||
pfUI:UpdateConfig("global", nil, "font_default", "Interface\\AddOns\\pfUI\\fonts\\Myriad-Pro.ttf")
|
||||
pfUI:UpdateConfig("global", nil, "font_size", "12")
|
||||
pfUI:UpdateConfig("global", nil, "font_unit", "Interface\\AddOns\\pfUI\\fonts\\BigNoodleTitling.ttf")
|
||||
pfUI:UpdateConfig("global", nil, "font_unit_size", "12")
|
||||
pfUI:UpdateConfig("global", nil, "font_combat", "Interface\\AddOns\\pfUI\\fonts\\Continuum.ttf")
|
||||
|
||||
pfUI:UpdateConfig("global", nil, "force_region", "1")
|
||||
pfUI:UpdateConfig("global", nil, "errors_limit", "1")
|
||||
pfUI:UpdateConfig("global", nil, "errors_hide", "0")
|
||||
@@ -551,5 +552,24 @@ function pfUI:MigrateConfig()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- migrating old to new font layout (> 3.0.0)
|
||||
if major <= 3 and minor <= 0 then
|
||||
-- migrate font_default
|
||||
if not strfind(pfUI_config.global.font_default, "\\") then
|
||||
pfUI_config.global.font_default = "Interface\\AddOns\\pfUI\\fonts\\" .. pfUI_config.global.font_default .. ".ttf"
|
||||
end
|
||||
|
||||
-- migrate font_unit
|
||||
if not strfind(pfUI_config.global.font_unit, "\\") then
|
||||
pfUI_config.global.font_unit = "Interface\\AddOns\\pfUI\\fonts\\" .. pfUI_config.global.font_unit .. ".ttf"
|
||||
end
|
||||
|
||||
-- migrate font_combat
|
||||
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
|
||||
end
|
||||
|
||||
pfUI_config.version = pfUI.version.string
|
||||
end
|
||||
|
||||
Vendored
+3
-3
@@ -9,9 +9,9 @@ end
|
||||
|
||||
function pfUI.environment:UpdateFonts()
|
||||
if pfUI_config and pfUI_config.global and pfUI_config.global.font_default then
|
||||
pfUI.font_default = "Interface\\AddOns\\pfUI\\fonts\\" .. (pfUI_config.global.font_default or "Myriad-Pro") .. ".ttf"
|
||||
pfUI.font_unit = "Interface\\AddOns\\pfUI\\fonts\\" .. (pfUI_config.global.font_unit or "BigNoodleTitling") .. ".ttf"
|
||||
pfUI.font_combat = "Interface\\AddOns\\pfUI\\fonts\\" .. (pfUI_config.global.font_combat or "Continuum") .. ".ttf"
|
||||
pfUI.font_default = pfUI_config.global.font_default or "Interface\\AddOns\\pfUI\\fonts\\Myriad-Pro.ttf"
|
||||
pfUI.font_unit = pfUI_config.global.font_unit or "Interface\\AddOns\\pfUI\\fonts\\BigNoodleTitling.ttf"
|
||||
pfUI.font_combat = pfUI_config.global.font_combat or "Interface\\AddOns\\pfUI\\fonts\\Continuum.ttf"
|
||||
else
|
||||
pfUI.font_default = "Interface\\AddOns\\pfUI\\fonts\\Myriad-Pro.ttf"
|
||||
pfUI.font_unit = "Interface\\AddOns\\pfUI\\fonts\\BigNoodleTitling.ttf"
|
||||
|
||||
+8
-8
@@ -571,14 +571,14 @@ pfUI:RegisterModule("gui", function ()
|
||||
|
||||
-- dropdown menu items
|
||||
local dropdown_selection_fonts = {
|
||||
"BigNoodleTitling",
|
||||
"Continuum",
|
||||
"DieDieDie",
|
||||
"Expressway",
|
||||
"Homespun",
|
||||
"Myriad-Pro",
|
||||
"PT-Sans-Narrow-Bold",
|
||||
"PT-Sans-Narrow-Regular"
|
||||
"Interface\\AddOns\\pfUI\\fonts\\BigNoodleTitling.ttf:BigNoodleTitling",
|
||||
"Interface\\AddOns\\pfUI\\fonts\\Continuum.ttf:Continuum",
|
||||
"Interface\\AddOns\\pfUI\\fonts\\DieDieDie.ttf:DieDieDie",
|
||||
"Interface\\AddOns\\pfUI\\fonts\\Expressway.ttf:Expressway",
|
||||
"Interface\\AddOns\\pfUI\\fonts\\Homespun.ttf:Homespun",
|
||||
"Interface\\AddOns\\pfUI\\fonts\\Myriad-Pro.ttf:Myriad-Pro",
|
||||
"Interface\\AddOns\\pfUI\\fonts\\PT-Sans-Narrow-Bold.ttf:PT-Sans-Narrow-Bold",
|
||||
"Interface\\AddOns\\pfUI\\fonts\\PT-Sans-Narrow-Regular.ttf:PT-Sans-Narrow-Regular"
|
||||
}
|
||||
|
||||
local dropdown_unitframes_text = {
|
||||
|
||||
Reference in New Issue
Block a user