View Single Post
01-04-13, 08:02 PM   #10
laukond
A Black Drake
Join Date: Dec 2011
Posts: 87
Originally Posted by semlar View Post
You might even try something like this to switch it back if it modifies the value..
Lua Code:
  1. hooksecurefunc(ActionButton1, '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.
Does above code work for MultiBarBottomLeft, Right, etc.?
  Reply With Quote