Quantcast WoWInterface - View Single Post - Action Bar Textures
View Single Post
01-05-13, 10:37 AM   #13
A Black Drake
Join Date: Dec 2011
Posts: 87
Lua Code:
  1. local function ActuallyHideGrid(barName)
  2.     for i=1, NUM_MULTIBAR_BUTTONS do
  3.         local button = _G[barName.."Button"..i]
  4.         button:SetAttribute("showgrid",0)
  5.         for i,region in pairs({button:GetRegions()}) do
  6.             if region.GetTexture and region:GetTexture() then
  7.                 region:SetAlpha(0)
  8.             end
  9.         end
  10.     end
  11. end
  12. ActuallyHideGrid("MultiBarBottomLeft")
  13. ActuallyHideGrid("MultiBarBottomRight")
  14. ActuallyHideGrid("MultiBarRight")
  15. ActuallyHideGrid("MultiBarLeft")

This did not work for me. It would bug out one button every time I tried, and if I tried moving the spell on that button it would show all grids.

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)

This on the other hand worked very well, BUT the problem is it is impossible to put at spell from the spellbook etc. down to the Action Bar, since the textures never appear.
So if there could be added a condition to only hide when not dragging anything (such as a macro, ability, trinket, etc.) then it would work very well :-)
  Reply With Quote