Quantcast

update readme

Ou Junhui [09-20-21 - 11:14]
update readme
Filename
rSkin/init.lua
rSkin/modules/Ls_Toasts.lua
rSkin/rSkin.toc
readme.md
diff --git a/rSkin/init.lua b/rSkin/init.lua
new file mode 100644
index 0000000..5d965f4
--- /dev/null
+++ b/rSkin/init.lua
@@ -0,0 +1,37 @@
+local A, L = ...
+
+-----------------------------
+-- rSkin Global
+-----------------------------
+local rSkin = CreateFrame("Frame")
+rSkin.skins = {}
+
+local function ThrowError(err, message)
+	if not err then return end
+
+	err = format("%s: %s Error\n%s", A, message, err)
+
+	if _G.BaudErrorFrameHandler then
+		_G.BaudErrorFrameHandler(err)
+	else
+		_G.ScriptErrorsFrame:OnError(err, false, false)
+	end
+end
+
+function rSkin:RegisterSkin(name, func)
+    if not self.skins[name] then
+		self.skins[name] = func
+	end
+end
+
+function rSkin:OnLogin()
+    print(A.." loaded.")
+    for name, func in next, self.skins do
+		if name and type(func) == "function" then
+			local _, catch = pcall(func)
+			ThrowError(catch, format("%s Skin", name))
+		end
+	end
+end
+
+rSkin:RegisterEvent("PLAYER_LOGIN", self.OnLogin)
\ No newline at end of file
diff --git a/rSkin/modules/Ls_Toasts.lua b/rSkin/modules/Ls_Toasts.lua
new file mode 100644
index 0000000..537b155
--- /dev/null
+++ b/rSkin/modules/Ls_Toasts.lua
@@ -0,0 +1,80 @@
+local A, L = ...
+
+local function Skin_LsToasts()
+	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 = DB.TexCoord,
+		},
+		icon_border = {
+			color = {0, 0, 0},
+			offset = 0,
+			size = 1,
+			texture = {1, 1, 1, 1},
+		},
+		slot = {
+			tex_coords = DB.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)
+				-- toast.SetBackground = B.Dummy
+				toast.styled = true
+			end
+			index = index + 1
+			toast = _G["LSToast"..index]
+		end
+	end
+	hooksecurefunc(LE, "GetToast", reskinFunc)
+end
+
+rSkin:RegisterSkin("ls_Toasts", Skin_LsToasts)
\ No newline at end of file
diff --git a/rSkin/rSkin.toc b/rSkin/rSkin.toc
new file mode 100644
index 0000000..8796324
--- /dev/null
+++ b/rSkin/rSkin.toc
@@ -0,0 +1,8 @@
+## Interface: 20502
+## Author: rawoil
+## Title: rSkin |cff1a9fc0BCC|r
+## Notes: Reskin other addons to fit zorkui's L&F
+## RequiredDeps: rLib, rButtonTemplate_Zork
+## OptionalDeps: MerInspect, ThreatClassic2, DBM, WeakAuras, ls_Toasts
+
+init.lua
\ No newline at end of file
diff --git a/readme.md b/readme.md
index 8f53193..d19572f 100644
--- a/readme.md
+++ b/readme.md
@@ -11,15 +11,16 @@ There is **NO** gui for configurating! So you SHOULD and MUST modify the lua fil

 ## Addon List
 - oUF _basic unit framework fixed by tukz_
-- [oUF_Simple](https://github.com/zorker/rothui/blob/master/wow7.0/oUF_SimpleConfig/README.md) _simple is the best_
+- [oUF_Simple](https://github.com/zorker/rothui/blob/master/wow7.0/oUF_SimpleConfig/README.md) _simple is the best. With RaidDebuffs, Arena, Trinket, HealPrediction, DedebuffHighlight, Swing, CombatPoints modules enabled_
 - [rActionBar](https://github.com/zorker/rothui/blob/master/wow7.0/rActionBar/README.me) _style the action bar_
+- rBag _a lightweight inventory addon_
 - [rBuffFrame](https://github.com/zorker/rothui/blob/master/wow7.0/rBuffFrame/README.me) _style the buff frame_
 - [rButtonTemplate](https://github.com/zorker/rothui/blob/master/wow7.0/rButtonTemplate/README.me) _style buttons_
 - [rChat](https://www.wowinterface.com/downloads/info18319-rChat.html) _tweek the chatframe a little bit_
 - [rCombatText](https://www.wowinterface.com/downloads/info24251-rCombatText.html) _change the damage font_
 - [rEmote](https://www.wowinterface.com/downloads/info24254-rEmote.html) _notice the npc warning on the top center of screen_
 - [rError](https://www.wowinterface.com/downloads/info24253-rError.html) _hide some
-- [rFilter](https://www.wowinterface.com/downloads/info24279-rFilter_Zork.html) _A tiny WA/TMW. sorted by class instead of character, pls refer to hunter.lua, just change the spellid and cd/debuff/buff func to check the result, the points are well placed_
+- [rFilter](https://www.wowinterface.com/downloads/info24279-rFilter_Zork.html) _monitor player's cooldown, or buffs and debuffs from player or enemy. Pls refer to hunter.lua, just change the spellid and cd/debuff/buff func to check the result, the points are well placed_
 - [rLib](https://github.com/zorker/rothui/blob/master/wow7.0/rLib/README.me) _basic library dependent by all zorkui addons_
 - [rMinimap](https://www.wowinterface.com/downloads/info11253-rMinimap.html) _style minimap_
 - [rSellPoor](https://www.wowinterface.com/downloads/info24775-rSellPoor.html) _just sell junk_
@@ -30,11 +31,11 @@ There is **NO** gui for configurating! So you SHOULD and MUST modify the lua fil
 1. Questie
 2. OmniCC
 3. tullaRange
-4. tdBag2 with glass, tdAuction, tdPack
+4. tdAuction

 ## Further Plans
-1. make rTooltip better
-2. ...
+1. skin 3rd party addons
+2. improve rChat module

 ## Credit
 All credit goes to [zork](https://wowinterface.com/forums/member.php?userid=101381) and [cocovanana](https://wowinterface.com/forums/member.php?userid=342642)