View Single Post
09-20-22, 06:06 AM   #3
Zax
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 147
I understand the value of following good practices, but as far as I know a frame defined as "button" handles mouseClick by default.

Anyhow, I tested with button:SetMouseClickEnabled() without success.
PostClick script works, so the button is active and correctly responds to clicks. The problem comes from:
Lua Code:
  1. button:SetAttribute("type", "macro")
  2. button:SetAttribute("macrotext", "/sit")

Concerning the macro itself (/sit), it's just a basic example used in my tests.
As the buttons in part of my addon NPCsMarker, the real macro is something like "/wm 1" or "/cwm 1" to place or clear ground markers.
__________________
Zax - Addons List, not all maintained.
  Reply With Quote