Thread: Stack overflow
View Single Post
01-11-24, 12:51 AM   #4
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,327
In all honestly, I rather use buttons than generic frames to receive clicks. As I said earlier, mouse events require the frame to be "visible" already to fire, they shouldn't if they're hidden. This is just over-engineered.

It should be this simple.
Lua Code:
  1. local function SetWidgetScript(frame,method)
  2.     for _,button in ipairs(frame.buttons) do
  3.         button:HookScript("OnMouseDown",method);
  4.     end
  5. end
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote