mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-22 07:36:56 +00:00
core: use media mechanism for configurable paths
This commit is contained in:
+3
-3
@@ -232,7 +232,7 @@ function pfUI.uf:UpdateConfig()
|
||||
if tonumber(f.config.height) < 0 then f.hp:Hide() end
|
||||
pfUI.api.CreateBackdrop(f.hp, default_border)
|
||||
|
||||
f.hp.bar:SetStatusBarTexture(f.config.bartexture)
|
||||
f.hp.bar:SetStatusBarTexture(pfUI.media[f.config.bartexture])
|
||||
f.hp.bar:SetAllPoints(f.hp)
|
||||
if f.config.verticalbar == "1" then
|
||||
f.hp.bar:SetOrientation("VERTICAL")
|
||||
@@ -258,7 +258,7 @@ function pfUI.uf:UpdateConfig()
|
||||
if tonumber(f.config.pheight) < 0 then f.power:Hide() end
|
||||
|
||||
pfUI.api.CreateBackdrop(f.power, default_border)
|
||||
f.power.bar:SetStatusBarTexture(f.config.bartexture)
|
||||
f.power.bar:SetStatusBarTexture(pfUI.media[f.config.bartexture])
|
||||
f.power.bar:SetAllPoints(f.power)
|
||||
|
||||
f.portrait:SetFrameStrata("LOW")
|
||||
@@ -321,7 +321,7 @@ function pfUI.uf:UpdateConfig()
|
||||
end
|
||||
|
||||
if f.config.hitindicator == "1" then
|
||||
f.feedbackText:SetFont(f.config.hitindicatorfont, f.config.hitindicatorsize, "OUTLINE")
|
||||
f.feedbackText:SetFont(pfUI.media[f.config.hitindicatorfont], f.config.hitindicatorsize, "OUTLINE")
|
||||
f.feedbackFontHeight = f.config.hitindicatorsize
|
||||
f.feedbackStartTime = GetTime()
|
||||
if f.config.portrait == "bar" or f.config.portrait == "off" then
|
||||
|
||||
@@ -512,7 +512,7 @@ pfUI:RegisterModule("actionbar", 20400, function ()
|
||||
local function CreateActionButton(parent, bar, button)
|
||||
-- load config
|
||||
local size = C.bars["bar"..bar].icon_size
|
||||
local font = C.bars.font
|
||||
local font = pfUI.media[C.bars.font]
|
||||
local font_offset = tonumber(C.bars.font_offset)
|
||||
|
||||
local macro_size = tonumber(C.bars.macro_size)
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ pfUI:RegisterModule("castbar", 20400, function ()
|
||||
default_border = C.appearance.border.unitframes
|
||||
end
|
||||
|
||||
local cbtexture = C.appearance.castbar.texture
|
||||
local cbtexture = pfUI.media[C.appearance.castbar.texture]
|
||||
|
||||
local function CreateCastbar(name, parent, unitstr, unitname)
|
||||
local cb = CreateFrame("Frame", name, parent or UIParent)
|
||||
|
||||
@@ -3,7 +3,7 @@ pfUI:RegisterModule("nameplates", 20400, function ()
|
||||
local font_size = C.nameplates.use_unitfonts == "1" and C.global.font_unit_size or C.global.font_size
|
||||
local inactive_alpha = tonumber(C.nameplates.notargalpha)
|
||||
local glowr, glowg, glowb, glowa = GetStringColor(C.nameplates.glowcolor)
|
||||
local hptexture = C.nameplates.healthtexture
|
||||
local hptexture = pfUI.media[C.nameplates.healthtexture]
|
||||
|
||||
pfUI.nameplates = CreateFrame("Frame", nil, UIParent)
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ pfUI:RegisterModule("screenshot", function ()
|
||||
pfUI.screenshot.caption:SetWidth(400)
|
||||
pfUI.screenshot.caption:SetHeight(200)
|
||||
pfUI.screenshot.caption.text = pfUI.screenshot.caption:CreateFontString("Label", "OVERLAY")
|
||||
pfUI.screenshot.caption.text:SetFont(C.screenshot.caption_font, C.screenshot.caption_size, "THICKOUTLINE")
|
||||
pfUI.screenshot.caption.text:SetFont(pfUI.media[C.screenshot.caption_font], C.screenshot.caption_size, "THICKOUTLINE")
|
||||
pfUI.screenshot.caption.text:SetAllPoints(pfUI.screenshot.caption)
|
||||
pfUI.screenshot.caption.text:SetJustifyH("CENTER")
|
||||
pfUI.screenshot.caption.text:SetJustifyV("TOP")
|
||||
|
||||
@@ -741,7 +741,7 @@ pfUI:RegisterModule("thirdparty", function ()
|
||||
|
||||
-- set pfUI bar font
|
||||
if TheoryCraft_Settings then
|
||||
TheoryCraft_Settings["FontPath"] = C.bars.font
|
||||
TheoryCraft_Settings["FontPath"] = pfUI.media[C.bars.font]
|
||||
end
|
||||
|
||||
if not pfUI.bars then return end
|
||||
|
||||
@@ -122,9 +122,9 @@ function pfUI:UpdateFonts()
|
||||
unit = "Fonts\\2002.TTF"
|
||||
else
|
||||
-- use default entries
|
||||
default = pfUI_config.global.font_default
|
||||
combat = pfUI_config.global.font_combat
|
||||
unit = pfUI_config.global.font_unit
|
||||
default = pfUI.media[pfUI_config.global.font_default]
|
||||
combat = pfUI.media[pfUI_config.global.font_combat]
|
||||
unit = pfUI.media[pfUI_config.global.font_unit]
|
||||
end
|
||||
|
||||
-- write setting shortcuts
|
||||
|
||||
Reference in New Issue
Block a user