View Single Post
03-04-13, 11:19 AM   #9
ravagernl
Proceritate Corporis
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 1,176
Hmm, this got me thinking... Would this not be possible with a custom state, or are custom states not allowed on unitframes (Is SecureUnitButtonTemplate inheriting attributes/methods of SecureHandlerStateTemplate)?

lua Code:
  1. PlayerFrame:SetAttribute("_onstate-mousestate", [[
  2.     self:EnableMouse(newstate == "enabled")
  3. ]]);
  4. -- Normal, not listening to shift
  5. RegisterStateDriver(PlayerFrame, "mousestate", "[combat] disabled; enabled");
  6. -- Disable clicking in combat unless ctrl/shift/alt is pressed
  7. -- RegisterStateDriver(PlayerFrame, "mousestate", "[mod] enabled; [combat] disabled; enabled");

Last edited by ravagernl : 03-04-13 at 11:36 AM. Reason: grammar biatch!
  Reply With Quote