From 2cae10c82a2c7d8917e2c9816fddf7e4cc73c1dc Mon Sep 17 00:00:00 2001 From: Pizzahawaiii <119806513+Pizzahawaiii@users.noreply.github.com> Date: Mon, 26 Dec 2022 10:34:38 +0100 Subject: [PATCH] bubbles: add option to hide borders --- api/config.lua | 1 + modules/bubbles.lua | 3 ++- modules/gui.lua | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/api/config.lua b/api/config.lua index 017a45fb..2a55e603 100644 --- a/api/config.lua +++ b/api/config.lua @@ -654,6 +654,7 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("chat", "global", "fadeout", "0") pfUI:UpdateConfig("chat", "global", "fadetime", "300") pfUI:UpdateConfig("chat", "global", "scrollspeed", "1") + pfUI:UpdateConfig("chat", "bubbles", "borders", "1") pfUI:UpdateConfig("chat", "bubbles", "alpha", ".75") pfUI:UpdateConfig("nameplates", nil, "showhostile", "1") diff --git a/modules/bubbles.lua b/modules/bubbles.lua index 9aa8293b..61f9e991 100644 --- a/modules/bubbles.lua +++ b/modules/bubbles.lua @@ -27,7 +27,8 @@ pfUI:RegisterModule("bubbles", "vanilla:tbc", function () local r,g,b,a = f.text:GetTextColor() f.frame.text:SetText(f.text:GetText()) f.frame.text:SetTextColor(r,g,b,a) - f.frame.backdrop:SetBackdropBorderColor(r,g,b,a) + local border_alpha = C.chat.bubbles.borders == "1" and a or 0 + f.frame.backdrop:SetBackdropBorderColor(r,g,b,border_alpha) end function pfUI.bubbles:ScanBubbles() diff --git a/modules/gui.lua b/modules/gui.lua index 2a2e44fc..4fdc46f8 100644 --- a/modules/gui.lua +++ b/modules/gui.lua @@ -2167,6 +2167,7 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function () CreateConfig(nil, T["Mousewheel Scroll Speed"], C.chat.global, "scrollspeed") CreateConfig(nil, T["Enable Chat Bubbles"], "CVAR", "chatBubbles", "checkbox") CreateConfig(nil, T["Enable Party Chat Bubbles"], "CVAR", "chatBubblesParty", "checkbox") + CreateConfig(nil, T["Enable Chat Bubble Borders"], C.chat.bubbles, "borders", "checkbox") CreateConfig(nil, T["Chat Bubble Transparency"], C.chat.bubbles, "alpha") end)