Reply
 
Thread Tools Display Modes
Unread 01-04-13, 09:59 AM   #1
laukond
A Black Drake
Join Date: Dec 2011
Posts: 81
Action Bar Textures

http://i.imgur.com/ue8Pi.jpg

Is there a way a way to remove the textures seen on MultiBarBottomLeft, MultiBarBottomRight, and MultiBarRight?
Always Show ActionBars is unticked. I know /reload hides them, but is there not a script that removes them so I do not have to /reload all the time :-D

Thanks!


CONCLUSION
This fixes the problem:

Lua Code:
  1. local oSetAttribute = getmetatable(ActionButton1).__index.SetAttribute
  2. hooksecurefunc(getmetatable(ActionButton1).__index, 'SetAttribute', function(self, attribute)
  3.     if attribute ~= 'showgrid' or GetCVar('alwaysShowActionBars') ~= '0' or not self.action then return end
  4.     oSetAttribute(self, 'showgrid', GetCursorInfo() and 1 or 0)
  5.     if not HasAction(self.action) then self:Hide() end
  6. end)

Last edited by laukond : 01-05-13 at 08:33 PM.
laukond is offline   Reply With Quote
Unread 01-04-13, 12:56 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 9,614
Well, what actionbar addon are you using?
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

Seerah is offline   Reply With Quote
Unread 01-04-13, 03:57 PM   #3
laukond
A Black Drake
Join Date: Dec 2011
Posts: 81
Originally Posted by Seerah View Post
Well, what actionbar addon are you using?
Just simple :SetPoint of the default.
But this problem I have had even before I used AddOns where it would bug like that.
Is there a way to hide the texture?

Edit: Here is the entire AddOn I use, incase you want to look at it: http://pastebin.com/5RQj4ccv

Last edited by laukond : 01-04-13 at 04:50 PM.
laukond is offline   Reply With Quote
Unread 01-04-13, 06:54 PM   #4
jeffy162
Premium Member
 
jeffy162's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 1,836
Well, this is probably just going to show off my incredible amount of ignorance, but, if you open Blizzards options to the "ActionBars" page is the "Always Show ActionBars" option checked?

Had this problem in the MoP beta with Bartender (because Dominos hadn't been updated yet) and just thought this might be a similar problem.
__________________
Ahhhh, the vagueries of the aging mind. Wait.... What was I saying?

jeffy162 is offline   Reply With Quote
Unread 01-04-13, 06:55 PM   #5
laukond
A Black Drake
Join Date: Dec 2011
Posts: 81
Originally Posted by laukond View Post
Always Show ActionBars is unticked.
:-)
/10chars
laukond is offline   Reply With Quote
Unread 01-04-13, 07:04 PM   #6
laukond
A Black Drake
Join Date: Dec 2011
Posts: 81
Can there be done something like:

Code:
MultiBarBottomLeftButton1EmptyTexture:SetAlpha(0)
Of course it is not called 'EmptyTexture' but I have not been able to locate its name with /fstack true (if it exists).
laukond is offline   Reply With Quote
Unread 01-04-13, 07:33 PM   #7
semlar
A Molten Giant
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 596
Is this an occasional bug or is it always like this? You said it fixes itself after a reload.

You could try calling MultiActionBar_HideAllGrids() or, if that doesn't do it, loop through every action button and do something like..
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.         if not HasAction(button.action) then
  6.             button:Hide()
  7.         end
  8.     end
  9. end
  10. ActuallyHideGrid("MultiBarBottomLeft")
  11. ActuallyHideGrid("MultiBarBottomRight")
  12. ActuallyHideGrid("MultiBarRight")
  13. ActuallyHideGrid("MultiBarLeft")

Last edited by semlar : 01-04-13 at 07:39 PM.
semlar is offline   Reply With Quote
Unread 01-04-13, 07:36 PM   #8
laukond
A Black Drake
Join Date: Dec 2011
Posts: 81
Originally Posted by semlar View Post
Is this an occasional bug or is it always like this? You said it fixes itself after a reload.

You could try calling MultiActionBar_HideAllGrids() or, if that doesn't do it, loop through every action button and do something like "if not HasAction(button.action) then button:SetAttribute("showgrid",0) button:Hide() end".
It is an occasional bug that occurs on random stuff like accepting/completing a quest.
And ehh.. I'm not really that sharp at writing code, could you write the above more in-depth?
laukond is offline   Reply With Quote
Unread 01-04-13, 07:43 PM   #9
semlar
A Molten Giant
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 596
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.
semlar is offline   Reply With Quote
Reply

Go BackWoWInterface » Developer Discussions » Lua/XML Help » Action Bar Textures

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off