mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-25 13:30:50 +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
|
if tonumber(f.config.height) < 0 then f.hp:Hide() end
|
||||||
pfUI.api.CreateBackdrop(f.hp, default_border)
|
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)
|
f.hp.bar:SetAllPoints(f.hp)
|
||||||
if f.config.verticalbar == "1" then
|
if f.config.verticalbar == "1" then
|
||||||
f.hp.bar:SetOrientation("VERTICAL")
|
f.hp.bar:SetOrientation("VERTICAL")
|
||||||
@@ -258,7 +258,7 @@ function pfUI.uf:UpdateConfig()
|
|||||||
if tonumber(f.config.pheight) < 0 then f.power:Hide() end
|
if tonumber(f.config.pheight) < 0 then f.power:Hide() end
|
||||||
|
|
||||||
pfUI.api.CreateBackdrop(f.power, default_border)
|
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.power.bar:SetAllPoints(f.power)
|
||||||
|
|
||||||
f.portrait:SetFrameStrata("LOW")
|
f.portrait:SetFrameStrata("LOW")
|
||||||
@@ -321,7 +321,7 @@ function pfUI.uf:UpdateConfig()
|
|||||||
end
|
end
|
||||||
|
|
||||||
if f.config.hitindicator == "1" then
|
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.feedbackFontHeight = f.config.hitindicatorsize
|
||||||
f.feedbackStartTime = GetTime()
|
f.feedbackStartTime = GetTime()
|
||||||
if f.config.portrait == "bar" or f.config.portrait == "off" then
|
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)
|
local function CreateActionButton(parent, bar, button)
|
||||||
-- load config
|
-- load config
|
||||||
local size = C.bars["bar"..bar].icon_size
|
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 font_offset = tonumber(C.bars.font_offset)
|
||||||
|
|
||||||
local macro_size = tonumber(C.bars.macro_size)
|
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
|
default_border = C.appearance.border.unitframes
|
||||||
end
|
end
|
||||||
|
|
||||||
local cbtexture = C.appearance.castbar.texture
|
local cbtexture = pfUI.media[C.appearance.castbar.texture]
|
||||||
|
|
||||||
local function CreateCastbar(name, parent, unitstr, unitname)
|
local function CreateCastbar(name, parent, unitstr, unitname)
|
||||||
local cb = CreateFrame("Frame", name, parent or UIParent)
|
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 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 inactive_alpha = tonumber(C.nameplates.notargalpha)
|
||||||
local glowr, glowg, glowb, glowa = GetStringColor(C.nameplates.glowcolor)
|
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)
|
pfUI.nameplates = CreateFrame("Frame", nil, UIParent)
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ pfUI:RegisterModule("screenshot", function ()
|
|||||||
pfUI.screenshot.caption:SetWidth(400)
|
pfUI.screenshot.caption:SetWidth(400)
|
||||||
pfUI.screenshot.caption:SetHeight(200)
|
pfUI.screenshot.caption:SetHeight(200)
|
||||||
pfUI.screenshot.caption.text = pfUI.screenshot.caption:CreateFontString("Label", "OVERLAY")
|
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:SetAllPoints(pfUI.screenshot.caption)
|
||||||
pfUI.screenshot.caption.text:SetJustifyH("CENTER")
|
pfUI.screenshot.caption.text:SetJustifyH("CENTER")
|
||||||
pfUI.screenshot.caption.text:SetJustifyV("TOP")
|
pfUI.screenshot.caption.text:SetJustifyV("TOP")
|
||||||
|
|||||||
@@ -741,7 +741,7 @@ pfUI:RegisterModule("thirdparty", function ()
|
|||||||
|
|
||||||
-- set pfUI bar font
|
-- set pfUI bar font
|
||||||
if TheoryCraft_Settings then
|
if TheoryCraft_Settings then
|
||||||
TheoryCraft_Settings["FontPath"] = C.bars.font
|
TheoryCraft_Settings["FontPath"] = pfUI.media[C.bars.font]
|
||||||
end
|
end
|
||||||
|
|
||||||
if not pfUI.bars then return end
|
if not pfUI.bars then return end
|
||||||
|
|||||||
@@ -122,9 +122,9 @@ function pfUI:UpdateFonts()
|
|||||||
unit = "Fonts\\2002.TTF"
|
unit = "Fonts\\2002.TTF"
|
||||||
else
|
else
|
||||||
-- use default entries
|
-- use default entries
|
||||||
default = pfUI_config.global.font_default
|
default = pfUI.media[pfUI_config.global.font_default]
|
||||||
combat = pfUI_config.global.font_combat
|
combat = pfUI.media[pfUI_config.global.font_combat]
|
||||||
unit = pfUI_config.global.font_unit
|
unit = pfUI.media[pfUI_config.global.font_unit]
|
||||||
end
|
end
|
||||||
|
|
||||||
-- write setting shortcuts
|
-- write setting shortcuts
|
||||||
|
|||||||
Reference in New Issue
Block a user