更新配置相关显示等

This commit is contained in:
rucky
2026-03-20 14:04:51 +08:00
parent 923a1f9ce2
commit 63337b14d2
14 changed files with 886 additions and 98 deletions

View File

@@ -789,6 +789,13 @@ local function InitPopupSkin()
text = _A.nameText or { 0.90, 0.88, 0.94 },
}
local function HidePopupTex(tex)
if not tex then return end
if tex.SetTexture then tex:SetTexture(nil) end
if tex.SetAlpha then tex:SetAlpha(0) end
if tex.Hide then tex:Hide() end
end
local function SkinButton(btn)
if not btn then return end
local regions = { btn:GetRegions() }
@@ -801,6 +808,17 @@ local function InitPopupSkin()
end
end
HidePopupTex(btn.GetNormalTexture and btn:GetNormalTexture())
HidePopupTex(btn.GetPushedTexture and btn:GetPushedTexture())
HidePopupTex(btn.GetHighlightTexture and btn:GetHighlightTexture())
HidePopupTex(btn.GetDisabledTexture and btn:GetDisabledTexture())
local btnName = btn:GetName() or ""
for _, sfx in ipairs({"Left", "Right", "Middle"}) do
local t = _G[btnName .. sfx]
if t then t:SetAlpha(0); t:Hide() end
end
btn:SetBackdrop({
bgFile = "Interface\\Buttons\\WHITE8X8",
edgeFile = "Interface\\Buttons\\WHITE8X8",
@@ -815,6 +833,39 @@ local function InitPopupSkin()
fs:SetFont(font, 12, "OUTLINE")
fs:SetTextColor(P.text[1], P.text[2], P.text[3])
end
if not btn.nanamiPopupStyled then
btn.nanamiPopupStyled = true
local origEnter = btn:GetScript("OnEnter")
local origLeave = btn:GetScript("OnLeave")
btn:SetScript("OnEnter", function()
if origEnter then origEnter() end
this:SetBackdropColor(_A.btnHoverBg[1], _A.btnHoverBg[2], _A.btnHoverBg[3], _A.btnHoverBg[4])
if _A.btnHoverBorder then
this:SetBackdropBorderColor(_A.btnHoverBorder[1], _A.btnHoverBorder[2], _A.btnHoverBorder[3], _A.btnHoverBorder[4])
elseif _A.btnHoverBd then
this:SetBackdropBorderColor(_A.btnHoverBd[1], _A.btnHoverBd[2], _A.btnHoverBd[3], _A.btnHoverBd[4])
end
local t = this:GetFontString()
if t and _A.btnActiveText then t:SetTextColor(_A.btnActiveText[1], _A.btnActiveText[2], _A.btnActiveText[3]) end
end)
btn:SetScript("OnLeave", function()
if origLeave then origLeave() end
this:SetBackdropColor(P.btnBg[1], P.btnBg[2], P.btnBg[3], P.btnBg[4])
this:SetBackdropBorderColor(P.btnBd[1], P.btnBd[2], P.btnBd[3], P.btnBd[4])
local t = this:GetFontString()
if t then t:SetTextColor(P.text[1], P.text[2], P.text[3]) end
end)
btn:SetScript("OnMouseDown", function()
if _A.btnDownBg then
this:SetBackdropColor(_A.btnDownBg[1], _A.btnDownBg[2], _A.btnDownBg[3], _A.btnDownBg[4])
end
end)
btn:SetScript("OnMouseUp", function()
this:SetBackdropColor(_A.btnHoverBg[1], _A.btnHoverBg[2], _A.btnHoverBg[3], _A.btnHoverBg[4])
end)
end
end
local function SkinPopupFrame(frame)