View Single Post
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,892
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