mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-04 04:30:01 +00:00
mapcolors: add option to resize group/raid circles
This commit is contained in:
@@ -167,6 +167,7 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("appearance", "minimap", "tracking_pulse", "1")
|
||||
pfUI:UpdateConfig("appearance", "worldmap", "mapreveal", "0")
|
||||
pfUI:UpdateConfig("appearance", "worldmap", "mapreveal_color", ".4,.4,.4,1")
|
||||
pfUI:UpdateConfig("appearance", "worldmap", "groupcircles", "3")
|
||||
|
||||
pfUI:UpdateConfig("loot", nil, "autoresize", "1")
|
||||
pfUI:UpdateConfig("loot", nil, "autopickup", "1")
|
||||
|
||||
@@ -1125,6 +1125,13 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function ()
|
||||
"64:" .. T["Large"],
|
||||
"128:" .. T["Huge"],
|
||||
},
|
||||
["mapcircle"] = {
|
||||
"5:" .. T["Tiny"],
|
||||
"3:" .. T["Small"],
|
||||
"1:" .. T["Medium"],
|
||||
"-1:" .. T["Large"],
|
||||
"-3:" .. T["Huge"],
|
||||
},
|
||||
}
|
||||
|
||||
-- add locale dependent client fonts to the list
|
||||
@@ -1443,6 +1450,7 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function ()
|
||||
CreateConfig(nil, T["Background Color"], C.appearance.border, "background", "color")
|
||||
CreateConfig(nil, T["Border Color"], C.appearance.border, "color", "color")
|
||||
CreateConfig(U["mapreveal"], T["Map Reveal Color"], C.appearance.worldmap, "mapreveal_color", "color")
|
||||
CreateConfig(U["mapcolors"], T["Map Group/Raid Circle Size"], C.appearance.worldmap, "groupcircles", "dropdown", pfUI.gui.dropdowns.mapcircle)
|
||||
CreateConfig(nil) -- spacer
|
||||
CreateConfig(nil, T["Enable Frame Shadow"], C.appearance.border, "shadow", "checkbox")
|
||||
CreateConfig(nil, T["Frame Shadow Intensity"], C.appearance.border, "shadow_intensity", "dropdown", pfUI.gui.dropdowns.uf_debuff_indicator_size)
|
||||
|
||||
+18
-3
@@ -1,7 +1,7 @@
|
||||
-- adds class colored circles on world and battlefield map
|
||||
pfUI:RegisterModule("mapcolors", function ()
|
||||
local mapcolors = CreateFrame("Frame", nil, UIParent)
|
||||
mapcolors:SetScript("OnUpdate", function()
|
||||
pfUI.mapcolors = CreateFrame("Frame", nil, UIParent)
|
||||
pfUI.mapcolors:SetScript("OnUpdate", function()
|
||||
-- throttle to to one item per .1 second
|
||||
if ( this.tick or 1) > GetTime() then return else this.tick = GetTime() + .1 end
|
||||
|
||||
@@ -44,7 +44,7 @@ pfUI:RegisterModule("mapcolors", function ()
|
||||
-- create icon if not yet existing
|
||||
if not frame.pfIcon then
|
||||
frame.pfIcon = frame:CreateTexture(nil, "OVERLAY")
|
||||
SetAllPointsOffset(frame.pfIcon, frame, 3, -3)
|
||||
SetAllPointsOffset(frame.pfIcon, frame, this.size, -this.size)
|
||||
end
|
||||
|
||||
-- check if unit is in same group
|
||||
@@ -75,4 +75,19 @@ pfUI:RegisterModule("mapcolors", function ()
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
pfUI.mapcolors.UpdateConfig = function()
|
||||
pfUI.mapcolors.size = tonumber(C.appearance.worldmap.groupcircles)
|
||||
|
||||
if not pfUI.mapcolors.buttons then return end
|
||||
for name, unitstr in pairs(pfUI.mapcolors.buttons) do
|
||||
frame = _G[name]
|
||||
|
||||
if frame and frame.pfIcon then
|
||||
SetAllPointsOffset(frame.pfIcon, frame, pfUI.mapcolors.size, -pfUI.mapcolors.size)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
pfUI.mapcolors:UpdateConfig()
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user