Add function to dynamically resize map markers (#26)

* add function to resize

* link option to function
This commit is contained in:
Anthony Narkevicius
2023-01-11 14:15:05 -08:00
committed by GitHub
parent ed8bdf1118
commit be0b3c2788
2 changed files with 9 additions and 1 deletions
+7
View File
@@ -117,6 +117,13 @@ function MM:CreateMark(mapid,IsSendedMark,x,y)
end
end
function MM:ResizeAll()
for k, _ in pairs(ElvUI_ShowedMarkers) do
ElvUI_ShowedMarkers[k]:SetWidth(E.db.general.mapMarkers.iconSize)
ElvUI_ShowedMarkers[k]:SetHeight(E.db.general.mapMarkers.iconSize)
end
end
function MM:RefreshAll()
MM:HideAll();
local mapid = GetCurrentMapAreaID();
+2 -1
View File
@@ -3,6 +3,7 @@ local C, L = unpack(select(2, ...))
local WM = E:GetModule("WorldMap")
local MM = E:GetModule("Minimap")
local AB = E:GetModule("ActionBars")
local MMk = E:GetModule("MapMarkers")
E.Options.args.maps = {
type = "group",
@@ -157,7 +158,7 @@ E.Options.args.maps = {
desc = L["Set the size of the map markers"],
min = 15, max = 50, step = 1,
get = function(info) return E.db.general.mapMarkers[info[#info]] end,
set = function(info, value) E.db.general.mapMarkers[info[#info]] = value E:StaticPopup_Show("PRIVATE_RL") end,
set = function(info, value) E.db.general.mapMarkers[info[#info]] = value MMk:ResizeAll() end,
disabled = function() return not E.db.general.mapMarkers.enable end,
},
}