From 146a0a2eb53a62bf90f6392faef40d40109d61f7 Mon Sep 17 00:00:00 2001 From: shagu Date: Mon, 15 Jun 2020 19:11:44 +0200 Subject: [PATCH] infight: add option to set glow intensity --- api/config.lua | 1 + modules/gui.lua | 8 ++++++++ modules/infight.lua | 10 ++++++---- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/api/config.lua b/api/config.lua index 62b63153..ec2c5952 100644 --- a/api/config.lua +++ b/api/config.lua @@ -151,6 +151,7 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("appearance", "infight", "screen", "0") pfUI:UpdateConfig("appearance", "infight", "aggro", "0") pfUI:UpdateConfig("appearance", "infight", "health", "1") + pfUI:UpdateConfig("appearance", "infight", "intensity", "16") pfUI:UpdateConfig("appearance", "bags", "unusable", "1") pfUI:UpdateConfig("appearance", "bags", "unusable_color", ".9,.2,.2,1") pfUI:UpdateConfig("appearance", "bags", "borderlimit", "1") diff --git a/modules/gui.lua b/modules/gui.lua index 5bf9db93..e4ededff 100644 --- a/modules/gui.lua +++ b/modules/gui.lua @@ -1118,6 +1118,13 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function () "TOP:" .. T["Top"], "RIGHT:" .. T["Right"] }, + ["glowintensity"] = { + "8:" .. T["Tiny"], + "16:" .. T["Small"], + "32:" .. T["Medium"], + "64:" .. T["Large"], + "128:" .. T["Huge"], + }, } -- add locale dependent client fonts to the list @@ -1454,6 +1461,7 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function () CreateConfig(U["infight"], T["Enable Combat Glow Effects On Screen Edges"], C.appearance.infight, "screen", "checkbox") CreateConfig(U["infight"], T["Enable Aggro Glow Effects On Screen Edges"], C.appearance.infight, "aggro", "checkbox") CreateConfig(U["infight"], T["Enable Low Health Glow Effects On Screen Edges"], C.appearance.infight, "health", "checkbox") + CreateConfig(U["infight"], T["Screen Edge Glow Intensity"], C.appearance.infight, "intensity", "dropdown", pfUI.gui.dropdowns.glowintensity) end) CreateGUIEntry(T["Settings"], T["Cooldown"], function() diff --git a/modules/infight.lua b/modules/infight.lua index f40d51a8..32fb3a50 100644 --- a/modules/infight.lua +++ b/modules/infight.lua @@ -32,16 +32,18 @@ pfUI:RegisterModule("infight", "vanilla:tbc", function () pfUI.infight.screen = CreateFrame("Frame", "pfUICombatScreen", UIParent) pfUI.infight.screen:SetFrameStrata("BACKGROUND") pfUI.infight.screen:SetAllPoints(WorldFrame) - pfUI.infight.screen:SetBackdrop({ - edgeFile = pfUI.media["img:glow"], edgeSize = 8, - insets = {left = 0, right = 0, top = 0, bottom = 0}, - }) pfUI.infight.screen:Hide() pfUI.infight.UpdateConfig = function(self) pfUI.infight.infight = C.appearance.infight.screen == "1" and true or nil pfUI.infight.aggro = C.appearance.infight.aggro == "1" and true or nil pfUI.infight.health = C.appearance.infight.health == "1" and true or nil + + pfUI.infight.screen:SetBackdrop({ + edgeFile = pfUI.media["img:glow"], edgeSize = tonumber(C.appearance.infight.intensity), + insets = {left = 0, right = 0, top = 0, bottom = 0}, + }) + pfUI.infight.screen:Hide() end