Commit ab068d4b authored by Merathilis's avatar Merathilis

Made some functions for MiniMap Buttons global.

parent dbf5f184
......@@ -169,12 +169,8 @@ end
function COMP:Initialize()
end
hooksecurefunc(
E,
"CheckIncompatible",
function(self)
COMP:RunCompatibilityFunctions()
end
)
hooksecurefunc(E, "CheckIncompatible", function(self)
COMP:RunCompatibilityFunctions()
end)
MER:RegisterModule(COMP:GetName())
......@@ -59,7 +59,7 @@ local function ClickFunc()
C_Timer_After(.5, HideButton)
end
local function CollectButtons()
function module:CollectButtons()
if (InCombatLockdown() or C_PetBattles and C_PetBattles_IsInBattle()) then return end
local size = module.db.size or 34
......@@ -126,7 +126,7 @@ local function CollectButtons()
end
end
local function SortButtons()
function module:SortButtons()
if #module.Buttons == 0 then return end
local lastbutton
......@@ -148,6 +148,7 @@ function module:Initialize()
MER:RegisterDB(self, "smb")
if db.enable ~= true then return end
-- Compatibility
if COMP.SLE and E.private.sle.minimap.mapicons.enable then return end
local pos = db.position or "TOPRIGHT"
......@@ -184,7 +185,7 @@ function module:Initialize()
-- Button Scripts
module.button:SetScript("OnClick", function()
SortButtons()
self:SortButtons()
if module.bin:IsShown() then
ClickFunc()
else
......@@ -193,8 +194,8 @@ function module:Initialize()
end)
C_Timer_After(.3, function()
CollectButtons()
SortButtons()
self:CollectButtons()
self:SortButtons()
end)
end
......
......@@ -120,7 +120,7 @@ local function Minimap()
guiInline = true,
get = function(info) return E.db.mui.smb[ info[#info] ] end,
set = function(info, value) E.db.mui.smb[ info[#info] ] = value; E:StaticPopup_Show("PRIVATE_RL"); end,
disabled = function() return (COMP.PA and _G.ProjectAzilroka.db.SMB == true or COMP.SLE and E.private.sle.minimap.mapicons.enable) end,
disabled = function() return (COMP.PA and _G.ProjectAzilroka.db.SquareMinimapButtons.Enable or COMP.SLE and E.private.sle.minimap.mapicons.enable) end,
args = {
credits = {
order = 1,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment