Thread Tools Display Modes
08-11-20, 05:52 AM   #1
liquidbase
A Warpwood Thunder Caller
 
liquidbase's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2010
Posts: 97
Problem with actionbar grid on beta

Hi @all!

Currently I have a problem with the action bars in the beta. You can see more details on the screenshot.



If there are no skills / macros in the bar, the action button 1 - 6 is not displayed. For this I have a few lines of code that is triggered at PLAYER_ENTERING_WORLD but does not solve the problem.
Lua Code:
  1. elseif event == 'PLAYER_ENTERING_WORLD' then
  2.         for i = 1, 6 do
  3.             local Button = _G['MultiBarBottomRightButton'..i]
  4.  
  5.             Button:SetAttribute('showgrid', 1)
  6.             Button:Show()
  7.         end
  8.     end

Perhaps does one of you have an idea why this could be?
  Reply With Quote
08-11-20, 10:25 AM   #2
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,877
I think there was a cvar that handled that .. I've not noticed it myself but will have to check it when I log in there later ( when it cools down )

In nUI we have this code that tells us to create the grid on our custom buttons.

if event == "ACTIONBAR_SHOWGRID" then overlay.layers.grid:SetAlpha( 1 );
elseif event == "ACTIONBAR_HIDEGRID" then overlay.layers.grid:SetAlpha( 0 );

I also have a plugin that uses the always show grid option ( cvar )

local uiAlwaysShowActionBars = GetCVar("alwaysShowActionBars");

Then dependant on that setting it either forces the grid to show or let the events handle it.

Of course they may have changed this in beta, so like I said, I will take a look later.
__________________
  Reply With Quote
08-11-20, 12:07 PM   #3
liquidbase
A Warpwood Thunder Caller
 
liquidbase's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2010
Posts: 97
That shouldn't be the problem. The CVar alwaysShowActionBars is set to 1 during the installation script. The buttons on each bar also have the showgrid attribute active.

Example bar3.lua (the one with the issue): https://github.com/liquidbase/Duffed...s/bar3.lua#L21

Example bar4.lua (without issue, empty): https://github.com/liquidbase/Duffed...s/bar4.lua#L22

On my main development char for beta there is no issue, but the bar is always filled up with skills and macros.
  Reply With Quote
08-11-20, 05:56 PM   #4
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,877
I just installed your current downloadable beta version of duffedUI and I could see nothing wrong ..

This folder has a screenshot showing several bars with them all having at least 2 neighbouring buttons empty .. I'll have to replace the ones I removed when I play next rofl.

https://drive.google.com/drive/folde...TO?usp=sharing
__________________
  Reply With Quote
08-12-20, 12:07 AM   #5
liquidbase
A Warpwood Thunder Caller
 
liquidbase's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2010
Posts: 97
Jep I know. On a character with filled actionbars, there is no issue. I behaved the same as what you can see on the screenshot.


With new characters, however, it looks different again.
Level50 Template Character:


Level1 standard character:
  Reply With Quote
08-12-20, 03:21 AM   #6
siweia
A Flamescale Wyrmkin
 
siweia's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2011
Posts: 126
Lua Code:
  1. button:ShowGrid(ACTION_BUTTON_SHOW_GRID_REASON_CVAR)
  Reply With Quote
08-12-20, 04:23 AM   #7
liquidbase
A Warpwood Thunder Caller
 
liquidbase's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2010
Posts: 97
Originally Posted by siweia View Post
Lua Code:
  1. button:ShowGrid(ACTION_BUTTON_SHOW_GRID_REASON_CVAR)
Tested and unfortunately no effects. The buttons 1-6 on the MultiBarBottomRight cannot currently be displayed if they are empty from the start.
  Reply With Quote
08-12-20, 10:46 PM   #8
JDoubleU00
A Firelord
 
JDoubleU00's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 463
Silly question, do you have the option enabled to always show the action bars?
__________________
Author of JWExpBar and JWRepBar.
  Reply With Quote
08-12-20, 11:37 PM   #9
liquidbase
A Warpwood Thunder Caller
 
liquidbase's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2010
Posts: 97
For sure. The option is set once during setup and then again in the actionbar's init script to be on the safe side. alwaysShowActionBars is set to 1.

Install-Script install.lua on line 121 in function cvarsetup()
Actionbar-Init-Script init.lua on line 225 in function Enable()
  Reply With Quote
08-13-20, 04:05 AM   #10
sezz
A Chromatic Dragonspawn
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 158
doesn't seem to be an issue with the grid, the buttons are hidden for me when empty

i can show them with

/run for i=1,6 do _G["MultiBarBottomRightButton"..i]:Show();end

but they're gone again on mouseover

maybe it helps
  Reply With Quote
08-13-20, 10:01 AM   #11
liquidbase
A Warpwood Thunder Caller
 
liquidbase's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2010
Posts: 97
Okay that's weird.
There is nothing in the code that would control that. Any idea how this can happen?
  Reply With Quote
08-13-20, 12:31 PM   #12
liquidbase
A Warpwood Thunder Caller
 
liquidbase's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2010
Posts: 97
Issue fixed with this function
Lua Code:
  1. function ab:FixMBBR()
  2.     for i = 1, 6 do
  3.         local Button = _G['MultiBarBottomRightButton'..i]
  4.  
  5.         Button:SetAttribute('showgrid', 1)
  6.         Button.noGrid = nil
  7.         Button:ShowGrid(ACTION_BUTTON_SHOW_GRID_REASON_CVAR)
  8.         Button:Show()
  9.     end
  10. end

SetAttribute has caused an issue with MultiActionBars.lua from Blizzard. All buttons are set to nil, only buttons 1-6 of the MultiBarBottomRight are set to true. nil or false shows the grid and the button while true hides the button.

In the end, @humfras got me on it. Thanks for that
  Reply With Quote
08-13-20, 08:44 PM   #13
siweia
A Flamescale Wyrmkin
 
siweia's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2011
Posts: 126
Originally Posted by liquidbase View Post
Tested and unfortunately no effects. The buttons 1-6 on the MultiBarBottomRight cannot currently be displayed if they are empty from the start.
This is weird. I use the code below in beta and it works perfectly fine.
Lua Code:
  1. local function buttonShowGrid(name, showgrid)
  2.     for i = 1, 12 do
  3.         local button = _G[name..i]
  4.         button:SetAttribute("showgrid", showgrid)
  5.         button:ShowGrid(ACTION_BUTTON_SHOW_GRID_REASON_CVAR)
  6.     end
  7. end

See here.
  Reply With Quote
08-14-20, 12:33 AM   #14
liquidbase
A Warpwood Thunder Caller
 
liquidbase's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2010
Posts: 97
Similar to my function to edit the buttons. However, since Shadowlands every button seems to have an additional field which means .nogrid, that is what caused the problem.

bar3.lua (bar with issue, shares the same code with all other bars)

init.lua (file for loading and creating bars, function to hide Blizzard-Stuff can found on top of the file)
  Reply With Quote
08-14-20, 05:26 AM   #15
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,877
Originally Posted by liquidbase View Post
Similar to my function to edit the buttons. However, since Shadowlands every button seems to have an additional field which means .nogrid, that is what caused the problem.

bar3.lua (bar with issue, shares the same code with all other bars)

init.lua (file for loading and creating bars, function to hide Blizzard-Stuff can found on top of the file)

Where are you getting that info about .nogrid field ?

I've checked the following files and none have nogrid mentioned anywhere.
https://www.townlong-yak.com/framexm...tionButton.lua
https://www.townlong-yak.com/framexm...onTemplate.xml
https://www.townlong-yak.com/framexm...onBarFrame.xml
https://www.townlong-yak.com/framexm...Controller.lua

Aha .. I think this is it .. A multiactionbar specific value .. but still seems to apply to all 12 buttons unless you override that constant value.

https://www.townlong-yak.com/framexm...ActionBars.lua
Lua Code:
  1. NUM_MULTIBAR_BUTTONS = 12;
  2. function MultiActionBar_ShowAllGrids (reason)
  3.     MultiActionBar_UpdateGrid("MultiBarBottomLeft", true, reason);
  4.     MultiActionBar_UpdateGrid("MultiBarBottomRight", true, reason);
  5.     MultiActionBar_UpdateGrid("MultiBarRight", true, reason);
  6.     MultiActionBar_UpdateGrid("MultiBarLeft", true, reason);
  7. end
  8. function MultiActionBar_HideAllGrids (reason)
  9.     MultiActionBar_UpdateGrid("MultiBarBottomLeft", false, reason);
  10.     MultiActionBar_UpdateGrid("MultiBarBottomRight", false, reason);
  11.     MultiActionBar_UpdateGrid("MultiBarRight", false, reason);
  12.     MultiActionBar_UpdateGrid("MultiBarLeft", false, reason);
  13. end
  14. function MultiActionBar_UpdateGrid (barName, show, reason)
  15.     for i = 1, NUM_MULTIBAR_BUTTONS do
  16.         local button = _G[barName.."Button"..i];
  17.         if ( show and not button.noGrid) then
  18.             button:ShowGrid(reason);
  19.         else
  20.             button:HideGrid(reason);
  21.         end
  22.     end
  23. end
  24. function MultiActionBar_UpdateGridVisibility ()
  25.     if ( ALWAYS_SHOW_MULTIBARS == "1" or ALWAYS_SHOW_MULTIBARS == 1 ) then
  26.         MultiActionBar_ShowAllGrids(ACTION_BUTTON_SHOW_GRID_REASON_CVAR);
  27.     else
  28.         MultiActionBar_HideAllGrids(ACTION_BUTTON_SHOW_GRID_REASON_CVAR);
  29.     end
  30. end
__________________
  Reply With Quote
08-14-20, 08:44 AM   #16
liquidbase
A Warpwood Thunder Caller
 
liquidbase's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2010
Posts: 97
Originally Posted by Xrystal View Post
Aha .. I think this is it .. A multiactionbar specific value .. but still seems to apply to all 12 buttons unless you override that constant value.
Yep, that is the root issue. But why? I can't tell. Doesn't make sense to me to be honest.
  Reply With Quote
08-14-20, 11:59 AM   #17
siweia
A Flamescale Wyrmkin
 
siweia's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2011
Posts: 126
Actually the MultiBarBottomRightButton 1 to 6 grid issue is already there since bfa.
I have been using this code in retail since 8.0. See here.

For this time earlier in SL alpha, I just changed what I did in retail from 'ActionButton_ShowGrid(button, ACTION_BUTTON_SHOW_GRID_REASON_CVAR)' to 'button:ShowGrid(ACTION_BUTTON_SHOW_GRID_REASON_CVAR)'.

Last edited by siweia : 08-14-20 at 12:03 PM.
  Reply With Quote

WoWInterface » PTR » PTR General Discussion » Problem with actionbar grid on beta

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