From e1f84e0330eafd9831300918f71af84d412da86a Mon Sep 17 00:00:00 2001 From: rawoil Date: Mon, 6 Dec 2021 18:12:39 +0800 Subject: [PATCH] skin merinspect --- rSkin/init.lua | 1 + rSkin/modules/MerInspect.lua | 39 +++++++++++++++++++++++++++++++++++++++ rSkin/rSkin.toc | 5 +++-- 3 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 rSkin/modules/MerInspect.lua diff --git a/rSkin/init.lua b/rSkin/init.lua index 794e5e7..35a3a20 100644 --- a/rSkin/init.lua +++ b/rSkin/init.lua @@ -45,6 +45,7 @@ local defaults = { weakauras = true, lstoasts = true, threatclassic2 = true, + dominos = true, } } diff --git a/rSkin/modules/MerInspect.lua b/rSkin/modules/MerInspect.lua new file mode 100644 index 0000000..5b55892 --- /dev/null +++ b/rSkin/modules/MerInspect.lua @@ -0,0 +1,39 @@ +local A, L = ... + +local thin = rLib.CopyTable(L.C.thin) +local btnConfig = rLib.CopyTable(L.C.button) + +local function SkinInspectFrame(frame) + if not frame then return end + if not frame.__skined then + for i = 1, 9 do + select(i, frame:GetRegions()):Hide() + end + + thin.bgColor = {frame:GetBackdropColor()} + frame.bd = L.CreateBackdrop(frame, nil, thin) + + frame.__skined = true + end + + local r, g, b = frame:GetBackdropBorderColor() + frame.bd:SetBackdropBorderColor(r, g, b) +end + +local function SkinMerInspect() + if not IsAddOnLoaded("MerInspect-BCC") then return end + + if not _G.ShowInspectItemListFrame then return end + + hooksecurefunc("ShowInspectItemListFrame", function(_, parent) + SkinInspectFrame(parent.inspectFrame) + end) + + if not _G.ClassicStatsFrameTemplate_OnShow then return end + + hooksecurefunc("ClassicStatsFrameTemplate_OnShow", function(self) + SkinInspectFrame(self) + end) +end + +rSkin:RegisterSkin("MerInspect", SkinMerInspect) \ No newline at end of file diff --git a/rSkin/rSkin.toc b/rSkin/rSkin.toc index 9b8ba7b..2d4f149 100644 --- a/rSkin/rSkin.toc +++ b/rSkin/rSkin.toc @@ -3,7 +3,7 @@ ## Title: rSkin |cff1a9fc0BCC|r ## Notes: Reskin other addons to fit zorkui's L&F ## RequiredDeps: rLib, rButtonTemplate_Zork, oUF_SimpleConfig -## OptionalDeps: DBM-Core, WeakAuras, ls_Toasts, Details, BigWigs_Plugins, ThreatClassic2, Dominos +## OptionalDeps: DBM-Core, WeakAuras, ls_Toasts, Details, BigWigs_Plugins, ThreatClassic2, Dominos, MerInspect-BCC ## SavedVariablesPerCharacter: rSkinDB init.lua @@ -13,4 +13,5 @@ modules\BigWigs.lua modules\DBM.lua modules\WeakAuras.lua modules\ThreatClassic2.lua -modules\Dominos.lua \ No newline at end of file +modules\Dominos.lua +modules\MerInspect.lua \ No newline at end of file -- 1.7.9.5