WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   PTR General Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=172)
-   -   Problem with actionbar grid on beta (https://www.wowinterface.com/forums/showthread.php?t=58144)

liquidbase 08-11-20 05:52 AM

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?

Xrystal 08-11-20 10:25 AM

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.

liquidbase 08-11-20 12:07 PM

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.

Xrystal 08-11-20 05:56 PM

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

liquidbase 08-12-20 12:07 AM

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:

siweia 08-12-20 03:21 AM

Lua Code:
  1. button:ShowGrid(ACTION_BUTTON_SHOW_GRID_REASON_CVAR)

liquidbase 08-12-20 04:23 AM

Quote:

Originally Posted by siweia (Post 336586)
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.

JDoubleU00 08-12-20 10:46 PM

Silly question, do you have the option enabled to always show the action bars?

liquidbase 08-12-20 11:37 PM

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()

sezz 08-13-20 04:05 AM

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

liquidbase 08-13-20 10:01 AM

Okay that's weird.
There is nothing in the code that would control that. Any idea how this can happen?

liquidbase 08-13-20 12:31 PM

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 :)

siweia 08-13-20 08:44 PM

Quote:

Originally Posted by liquidbase (Post 336587)
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.

liquidbase 08-14-20 12:33 AM

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)

Xrystal 08-14-20 05:26 AM

Quote:

Originally Posted by liquidbase (Post 336605)
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

liquidbase 08-14-20 08:44 AM

Quote:

Originally Posted by Xrystal (Post 336607)
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.

siweia 08-14-20 11:59 AM

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)'.


All times are GMT -6. The time now is 04:07 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI