Originally Posted by dreamcatcher
Ok well I'm confused. The option to show or hide micro names from the gui is working but only if i do a reload after selecting it in the gui.
|
Why are you hooking 'ActionButton_Update' twice? I'd hook it once, call Style() function from the hook, and call Style() function in UpdateStuff()
Code:
function UpdateActionButtonStyle()
for _, icon in pairs({
self:GetName(),
'MultiCastRecallSpellButton',
'MultiCastSummonSpellButton',
}) do
local macroname = _G[self:GetName()..'Name']
if (db.HideMacronames) then
macroname:SetAlpha(0)
end
end
end
function DreamTweaks:UpdateStuff()
UpdateActionButtonStyle()
-- etc
end
function StickThisIntoAFunctionSomewhere()
hooksecurefunc("ActionButton_Update", UpdateActionButtonStyle)
end