mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-21 23:26:56 +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 disabled = false
|
||||
|
||||
local function CheckConflicts()
|
||||
for _, name in pairs(conflictAddons) do
|
||||
if IsAddOnLoaded(name) then
|
||||
for _, addon in pairs(conflictAddons) do
|
||||
local name = addon
|
||||
EventUtil.ContinueOnAddOnLoaded(name, function()
|
||||
if not disabled then
|
||||
DEFAULT_CHAT_FRAME:AddMessage("|cff33ffccpfUI|r: " .. name .. " found, macrotweak disabled.")
|
||||
disabled = true
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
disabled = true
|
||||
end)
|
||||
end
|
||||
|
||||
-- do not write macro calls into chat input history
|
||||
@@ -64,7 +63,4 @@ pfUI:RegisterModule("macrotweak", function ()
|
||||
UseInventoryItem(slot)
|
||||
end
|
||||
end)
|
||||
|
||||
-- Check conflicts after one tick so all addons have finished loading
|
||||
RunNextFrame(CheckConflicts)
|
||||
end)
|
||||
@@ -45,8 +45,7 @@ pfUI:RegisterSkin("Macro", function ()
|
||||
MacroNewButton:ClearAllPoints()
|
||||
MacroNewButton:SetPoint("RIGHT", MacroExitButton, "LEFT", -2*bpad, 0)
|
||||
|
||||
MacroEditButton:SetHeight(22)
|
||||
MacroEditButton:SetWidth(150)
|
||||
MacroEditButton:SetSize(150, 22)
|
||||
MacroEditButton:ClearAllPoints()
|
||||
MacroEditButton:SetPoint("BOTTOMLEFT", MacroFrameSelectedMacroButton, "BOTTOMRIGHT", 6, -2)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user