From 852d3691c29a4077565c32da7254747968303d03 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 17 Nov 2025 00:27:48 +0000 Subject: [PATCH 1/2] Fix showtooltip icon fallback to use tooltip texture before question mark When #showtooltip is used without an explicit spell/item argument and all conditionals fail, the icon now falls back to the tooltip texture (first action) instead of immediately showing a question mark. This prevents the question mark icon from appearing when the macro has valid actions but none of their conditions are currently met. Fixes issue where macro icon becomes question mark when no target and Battle Shout buff is already active. --- Core.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Core.lua b/Core.lua index df04981..09e188f 100644 --- a/Core.lua +++ b/Core.lua @@ -2422,6 +2422,12 @@ function GetActionTexture(slot) -- This block handles the case where all conditionals fail and no explicit -- #showtooltip was set. It defaults to the macro's chosen icon (e.g., the red '?') if not actions.active and not actions.explicitTooltip and actions.list and table.getn(actions.list) > 0 then + -- First try to use the tooltip texture if it exists + if actions.tooltip and actions.tooltip.texture then + return actions.tooltip.texture + end + + -- Then try to get the macro's own icon local macroName = GetActionText(slot) if macroName then local macroID = GetMacroIndexByName(macroName) From f99b985395c3358538b4c31bf454bc0c8370bb3e Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 17 Nov 2025 18:10:09 +0000 Subject: [PATCH 2/2] Ensure icon always falls back to macro icon, never question mark Updated fallback logic to always use the macro's chosen icon (from the macro frame) when no action is active. The priority is now: 1. Tooltip texture (from first action if #showtooltip is present) 2. Macro's icon (from macro frame) 3. Never question mark (unless GetMacroInfo fails, which shouldn't happen) This ensures the icon properly shows the macro's icon when all conditionals fail, instead of showing a question mark. --- Core.lua | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/Core.lua b/Core.lua index 09e188f..355138e 100644 --- a/Core.lua +++ b/Core.lua @@ -2420,25 +2420,28 @@ function GetActionTexture(slot) if actions and (actions.active or actions.tooltip) then -- This block handles the case where all conditionals fail and no explicit - -- #showtooltip was set. It defaults to the macro's chosen icon (e.g., the red '?') + -- #showtooltip was set. It defaults to the macro's chosen icon. if not actions.active and not actions.explicitTooltip and actions.list and table.getn(actions.list) > 0 then - -- First try to use the tooltip texture if it exists - if actions.tooltip and actions.tooltip.texture then - return actions.tooltip.texture - end - - -- Then try to get the macro's own icon + -- Get the macro's own icon as fallback + local macroTexture = nil local macroName = GetActionText(slot) if macroName then local macroID = GetMacroIndexByName(macroName) if macroID and macroID > 0 then - local _, macroTexture = GetMacroInfo(macroID) - if macroTexture then - return macroTexture - end + local _, texture = GetMacroInfo(macroID) + macroTexture = texture end end - return CleveRoids.unknownTexture + + -- Prefer tooltip texture if it exists, otherwise use macro icon + if actions.tooltip and actions.tooltip.texture then + return actions.tooltip.texture + elseif macroTexture then + return macroTexture + end + + -- Should never reach here, but return macro texture or unknown as last resort + return macroTexture or CleveRoids.unknownTexture end -- Prioritize active action, fall back to tooltip