View Single Post
Old 01-04-13, 06:43 PM   #9
semlar
An Onyxian Warder
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 379
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 07:08 PM.
semlar is offline   Reply With Quote