From 45ee4d7e0fa3db4b2944eeff185ad827cfe8fa5b Mon Sep 17 00:00:00 2001 From: rawoil Date: Mon, 16 Aug 2021 13:00:36 +0800 Subject: [PATCH] add range for party and raid --- oUF_Simple/core/functions.lua | 9 +++++++++ oUF_Simple/core/style.lua | 1 + oUF_SimpleConfig/party.lua | 5 +++++ oUF_SimpleConfig/raid.lua | 5 +++++ 4 files changed, 20 insertions(+) diff --git a/oUF_Simple/core/functions.lua b/oUF_Simple/core/functions.lua index 3a5c807..92add3c 100644 --- a/oUF_Simple/core/functions.lua +++ b/oUF_Simple/core/functions.lua @@ -439,6 +439,15 @@ local function CreateReadyCheck(self) end L.F.CreateReadyCheck = CreateReadyCheck +local function CreateRange(self) + if not self.cfg.range or not self.cfg.range.enabled then return end + return { + insideAlpha = 1, + outsideAlpha = self.cfg.range.alpha, + } +end +L.F.CreateRange = CreateRange + local function CreateRaidDebuffs(self) if not self.cfg.debuffwatch or not self.cfg.debuffwatch.enabled then return end local cfg = self.cfg.debuffwatch diff --git a/oUF_Simple/core/style.lua b/oUF_Simple/core/style.lua index 0a48b38..da3920e 100644 --- a/oUF_Simple/core/style.lua +++ b/oUF_Simple/core/style.lua @@ -40,5 +40,6 @@ local function CreateStyle(self) self.RaidTargetIndicator = L.F.CreateRaidMark(self) self.ReadyCheckIndicator = L.F.CreateReadyCheck(self) self.RaidDebuffs = L.F.CreateRaidDebuffs(self) + self.Range = L.F.CreateRange(self) end L.F.CreateStyle = CreateStyle \ No newline at end of file diff --git a/oUF_SimpleConfig/party.lua b/oUF_SimpleConfig/party.lua index 8acd308..fa44005 100644 --- a/oUF_SimpleConfig/party.lua +++ b/oUF_SimpleConfig/party.lua @@ -65,6 +65,11 @@ L.C.party = { size = {12,12}, point = {"CENTER","CENTER",0,0}, }, + --range alpha + range = { + enabled = true, + alpha = 0.3, -- outside alpha + }, --buffs buffs = { enabled = false, diff --git a/oUF_SimpleConfig/raid.lua b/oUF_SimpleConfig/raid.lua index bbc3a5e..82bdc76 100644 --- a/oUF_SimpleConfig/raid.lua +++ b/oUF_SimpleConfig/raid.lua @@ -67,6 +67,11 @@ L.C.raid = { size = {12,12}, point = {"CENTER","CENTER",0,0}, }, + --range alpha + range = { + enabled = true, + alpha = 0.3, -- outside alpha + }, setup = { template = nil, visibility = "custom [group:raid] show; hide", -- 1.7.9.5