Quantcast

skin merinspect

rawoil [12-06-21 - 10:12]
skin merinspect
Filename
rSkin/init.lua
rSkin/modules/MerInspect.lua
rSkin/rSkin.toc
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