From 55e2d06834d1854358e22fe0fb1e71b3084e089a Mon Sep 17 00:00:00 2001 From: shagu Date: Sun, 4 Mar 2018 23:22:44 +0100 Subject: [PATCH] bubbles: switch to already existing cvar --- api/config.lua | 2 -- modules/bubbles.lua | 3 --- modules/gui.lua | 4 ++-- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/api/config.lua b/api/config.lua index e2355f10..a4d31338 100644 --- a/api/config.lua +++ b/api/config.lua @@ -565,8 +565,6 @@ 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", "chat", "1") - pfUI:UpdateConfig("chat", "bubbles", "party", "1") pfUI:UpdateConfig("chat", "bubbles", "alpha", ".75") pfUI:UpdateConfig("nameplates", nil, "use_unitfonts", "0") diff --git a/modules/bubbles.lua b/modules/bubbles.lua index 40e66126..2d8a1e34 100644 --- a/modules/bubbles.lua +++ b/modules/bubbles.lua @@ -2,9 +2,6 @@ pfUI:RegisterModule("bubbles", function () local alpha = tonumber(C.chat.bubbles.alpha) - SetCVar("chatBubbles", tonumber(C.chat.bubbles.chat)) - SetCVar("chatBubblesParty", tonumber(C.chat.bubbles.party)) - pfUI.bubbles = CreateFrame("Frame", "pfChatBubbles", UIParent) pfUI.bubbles:RegisterEvent("CHAT_MSG_SAY") pfUI.bubbles:RegisterEvent("CHAT_MSG_YELL") diff --git a/modules/gui.lua b/modules/gui.lua index f64fbc94..f886664e 100644 --- a/modules/gui.lua +++ b/modules/gui.lua @@ -1108,8 +1108,8 @@ pfUI:RegisterModule("gui", function () CreateConfig(nil, this, T["Enable Chat Fade"], C.chat.global, "fadeout", "checkbox") CreateConfig(nil, this, T["Seconds Before Chat Fade"], C.chat.global, "fadetime") CreateConfig(nil, this, T["Mousewheel Scroll Speed"], C.chat.global, "scrollspeed") - CreateConfig(nil, this, T["Enable Chat Bubbles"], C.chat.bubbles, "chat", "checkbox") - CreateConfig(nil, this, T["Enable Party Chat Bubbles"], C.chat.bubbles, "party", "checkbox") + CreateConfig(nil, this, T["Enable Chat Bubbles"], "CVAR", "chatBubbles", "checkbox") + CreateConfig(nil, this, T["Enable Party Chat Bubbles"], "CVAR", "chatBubblesParty", "checkbox") CreateConfig(nil, this, T["Chat Bubble Transparency"], C.chat.bubbles, "alpha") this.setup = true end