mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-18 18:40:49 +00:00
Defer macrotweak conflicts; use SetSize
Replace the previous RunNextFrame conflict check with per-addon EventUtil.ContinueOnAddOnLoaded calls in modules/macrotweak.lua so macrotweak is disabled as soon as known conflicting addons load. Simplify variable naming and ensure the disabled flag is set correctly. In skins/blizzard/macro.lua replace separate SetHeight/SetWidth calls with a single SetSize(150,22) for MacroEditButton to tidy UI sizing.
This commit is contained in:
+6
-10
@@ -2,15 +2,14 @@ pfUI:RegisterModule("macrotweak", function ()
|
|||||||
local conflictAddons = { "Supermacro", "SuperCleveRoidMacros", "UltimaMacros" }
|
local conflictAddons = { "Supermacro", "SuperCleveRoidMacros", "UltimaMacros" }
|
||||||
local disabled = false
|
local disabled = false
|
||||||
|
|
||||||
local function CheckConflicts()
|
for _, addon in pairs(conflictAddons) do
|
||||||
for _, name in pairs(conflictAddons) do
|
local name = addon
|
||||||
if IsAddOnLoaded(name) then
|
EventUtil.ContinueOnAddOnLoaded(name, function()
|
||||||
|
if not disabled then
|
||||||
DEFAULT_CHAT_FRAME:AddMessage("|cff33ffccpfUI|r: " .. name .. " found, macrotweak disabled.")
|
DEFAULT_CHAT_FRAME:AddMessage("|cff33ffccpfUI|r: " .. name .. " found, macrotweak disabled.")
|
||||||
disabled = true
|
|
||||||
return true
|
|
||||||
end
|
end
|
||||||
end
|
disabled = true
|
||||||
return false
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- do not write macro calls into chat input history
|
-- do not write macro calls into chat input history
|
||||||
@@ -64,7 +63,4 @@ pfUI:RegisterModule("macrotweak", function ()
|
|||||||
UseInventoryItem(slot)
|
UseInventoryItem(slot)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- Check conflicts after one tick so all addons have finished loading
|
|
||||||
RunNextFrame(CheckConflicts)
|
|
||||||
end)
|
end)
|
||||||
@@ -45,8 +45,7 @@ pfUI:RegisterSkin("Macro", function ()
|
|||||||
MacroNewButton:ClearAllPoints()
|
MacroNewButton:ClearAllPoints()
|
||||||
MacroNewButton:SetPoint("RIGHT", MacroExitButton, "LEFT", -2*bpad, 0)
|
MacroNewButton:SetPoint("RIGHT", MacroExitButton, "LEFT", -2*bpad, 0)
|
||||||
|
|
||||||
MacroEditButton:SetHeight(22)
|
MacroEditButton:SetSize(150, 22)
|
||||||
MacroEditButton:SetWidth(150)
|
|
||||||
MacroEditButton:ClearAllPoints()
|
MacroEditButton:ClearAllPoints()
|
||||||
MacroEditButton:SetPoint("BOTTOMLEFT", MacroFrameSelectedMacroButton, "BOTTOMRIGHT", 6, -2)
|
MacroEditButton:SetPoint("BOTTOMLEFT", MacroFrameSelectedMacroButton, "BOTTOMRIGHT", 6, -2)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user