infight: add option to set glow intensity

This commit is contained in:
shagu
2020-06-15 19:11:44 +02:00
parent 64fb0fa323
commit 146a0a2eb5
3 changed files with 15 additions and 4 deletions
+1
View File
@@ -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")
+8
View File
@@ -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()
+6 -4
View File
@@ -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