Quantcast

sss

Ou Junhui [09-20-21 - 12:46]
sss
Filename
rSkin/modules/2ls_Toasts.lua
diff --git a/rSkin/modules/2ls_Toasts.lua b/rSkin/modules/2ls_Toasts.lua
new file mode 100644
index 0000000..a3e0dab
--- /dev/null
+++ b/rSkin/modules/2ls_Toasts.lua
@@ -0,0 +1,81 @@
+local A, L = ...
+
+local function ls_Toasts()
+	if not IsAddOnLoaded("ls_Toasts") then return end
+
+	local LE, LC, LL = unpack(_G.ls_Toasts)
+	LE:RegisterSkin("zorkui", {
+		name = "ZorkUI",
+		border = {
+			color = {0, 0, 0},
+			offset = 0,
+			size = 1,
+			texture = {1, 1, 1, 1},
+		},
+		icon = {
+			tex_coords = rButtonTemplate_Zork_ActionButtonConfig.icon.texCoord,
+		},
+		icon_border = {
+			color = {0, 0, 0},
+			offset = 0,
+			size = 1,
+			texture = {1, 1, 1, 1},
+		},
+		slot = {
+			tex_coords = rButtonTemplate_Zork_ActionButtonConfig.icon.texCoord,
+		},
+		slot_border = {
+			color = {0, 0, 0},
+			offset = 0,
+			size = 1,
+			texture = {1, 1, 1, 1},
+		},
+		glow = {
+			texture = {1, 1, 1, 1},
+			size = {226, 50},
+		},
+		shine = {
+			tex_coords = {403 / 512, 465 / 512, 15 / 256, 61 / 256},
+			size = {67, 50},
+			point = {
+				y = -1,
+			},
+		},
+		text_bg = {
+			hidden = true,
+		},
+		dragon = {
+			hidden = true,
+		},
+		icon_highlight = {
+			hidden = true,
+		},
+		bg = {
+			default = {
+				texture = {0.06, 0.06, 0.06, 0.8},
+			},
+		},
+	})
+
+	LC.db.profile.skin = "zorkui"
+	LC.options.args.general.args.skin.disabled = true
+
+	local function reskinFunc()
+		local index = 1
+		local toast = _G["LSToast"..index]
+		while toast do
+			if toast.BG and not toast.styled then
+				toast.BG:SetTexture(nil)
+				-- B.SetBD(toast)
+				L.CreateBackdrop(toast)
+				toast.SetBackground = L.Dummy
+				toast.styled = true
+			end
+			index = index + 1
+			toast = _G["LSToast"..index]
+		end
+	end
+	hooksecurefunc(LE, "GetToast", reskinFunc)
+end
+
+rSkin:RegisterSkin("ls_Toasts", ls_Toasts)
\ No newline at end of file