View Single Post
01-04-13, 07:43 PM   #9
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
You might even try something like this to switch it back if it modifies the value..
Lua Code:
  1. hooksecurefunc(getmetatable(ActionButton1).__index, 'SetAttribute', function(self, attribute)
  2.     if attribute ~= 'showgrid' then return end
  3.     self:SetAttribute('showgrid',0)
  4.     if not HasAction(self.action) then
  5.         self:Hide()
  6.     end
  7. end)
So if SetAttribute gets called on the action button it just resets it back to 0.

Last edited by semlar : 01-04-13 at 08:08 PM.
  Reply With Quote