api: add new fonts and config migration

This commit is contained in:
shagu
2017-02-07 22:18:56 +01:00
parent fdac6c5d06
commit fa21ebbfd2
10 changed files with 72 additions and 23 deletions
+9
View File
@@ -26,6 +26,7 @@ pfUI.module = {}
pfUI.modules = {}
pfUI.environment = {}
pfUI.movables = {}
pfUI.version = {}
pfLocaleClass = {}
pfLocaleBagtypes = {}
@@ -51,7 +52,15 @@ pfUI:SetScript("OnEvent", function()
pfUI_profiles = {}
end
-- read pfUI version from .toc file
local major, minor, fix = pfUI.api.strsplit(".", tostring(GetAddOnMetadata("pfUI", "Version")))
pfUI.version.major = tonumber(major) or 1
pfUI.version.minor = tonumber(minor) or 2
pfUI.version.fix = tonumber(fix) or 0
pfUI.version.string = pfUI.version.major .. "." .. pfUI.version.minor .. "." .. pfUI.version.fix
pfUI:LoadConfig()
pfUI:MigrateConfig()
-- reload environment
pfUI.environment:UpdateFonts()