Thread Tools Display Modes
06-13-24, 05:41 AM   #1
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,968
OverrideBar issues rise up again ..

I've been playing Remix like many others ( who aren't lucky enough to get into the beta yet ) and I stumbled across several override bar issues.

Now, in light with nUI, I had decided to let Blizzard manage the override bar but just have nUI reposition things it didn't want Blizzard to control. However, the way Scott set up the keybinds for nUI meant that the override bar no long has keybinds, and vice versa if I try to set it up etc.

So, thought I would return back to having nUI manage the override bar and with so many quests in the Remix using it, I had ample tests to highlight the issues that occurred.

1. Buttons don't appear straight away ( Big Boom - BfA quest)
2. Bar jumps in and out during combat ( King Dun - Panda quest)
3. Bar and Buttons appear and disappear when initiated

I have been testing 1 for the last few days ( repeatedly ) in a simple addon to help identify what's needed for it to work and for some reason I can't get the icon to show. It's there but due to item 2 on the list, I need to limit what is done to avoid those functions that can't be used in combat.

My complete code is below and in lights to item 1 on the list the bar shows ( with all buttons but no icons ) when I cause the bar to appear ( do the next step in the quest ). The keybinds work fine, and inside the override bar's setup function I can see that it gets called whenever a button is updated with its action info, but the icon isn't shown.

Now, I can see GetActionInfo(action) as one of the okay functions ( hopefully while in combat too ) to use in the secured environment but, for some reason it returns nil inside the secure environment when it's insecure equivalent.

Also, the button's SetAttribute values never seem to get triggered so can't go that route either.

If anyone can see anything that I've missed for it to work as I expect, it would be a great help.
Thanks in advance.

edit: Just to add that if you reload the UI after the bar appears the active buttons have their icons show up. But when the inactive ones become active you have to do a reload to see the icon. So the icon is set to the button, it's just not being shown.

Lua Code:
  1. local BUTTON_SIZE, BUTTON_SPACING = 50, 1
  2. local NUM_ACTIONBAR_BUTTONS = 12
  3.  
  4. local BlizUI = CreateFrame( "Frame", "XAB_BlizUI", UIParent, "SecureFrameTemplate" )
  5. OverrideActionBar:SetParent(BlizUI)
  6. BlizUI:Hide()
  7.  
  8.  
  9. local barFrame = CreateFrame("Frame", "XBar_OverrideBar", UIParent, "SecureHandlerStateTemplate")
  10. barFrame:SetSize((BUTTON_SIZE + BUTTON_SPACING) * NUM_ACTIONBAR_BUTTONS, BUTTON_SIZE)
  11. barFrame:SetPoint("CENTER")
  12.  
  13. local background = barFrame:CreateTexture(nil, "BACKGROUND")
  14. background:SetColorTexture(0, 0, 0, 0.5)
  15. background:SetAllPoints()
  16. background:Show()
  17.  
  18. barFrame:Execute([[
  19.     ActionButtons = newtable()
  20. ]])
  21.  
  22. barFrame:SetPoint("CENTER")
  23.  
  24. local buttons = { }
  25. for i = 1, NUM_ACTIONBAR_BUTTONS do
  26.    
  27.     local button = CreateFrame("CheckButton","XBar_OverrideButton"..i, barFrame,"OverrideActionBarButtonTemplate")
  28.    
  29.     button:SetID(i)
  30.     button:SetSize(BUTTON_SIZE, BUTTON_SIZE)
  31.    
  32.     if i ~= 1 then
  33.         button:SetPoint("LEFT", buttons[i - 1], "RIGHT", BUTTON_SPACING, 0)
  34.     else
  35.         button:SetPoint("LEFT", 5, 0)
  36.     end
  37.    
  38.     button.icon:Show()
  39.  
  40.     local background = button:CreateTexture(nil, "BACKGROUND")
  41.     background:SetColorTexture(1, 1, 1, 0.5)
  42.     background:SetAllPoints()
  43.  
  44.     barFrame:SetFrameRef("button", button)
  45.     barFrame:Execute(([[
  46.         ActionButtons[%s] = self:GetFrameRef("button")
  47.     ]]):format(i))
  48.    
  49.     button:SetAttribute("_onstate-statehidden",[[
  50.         print("statehidden: ",newstate)    
  51.         if not newstate then return end
  52.         if newstate == "true" then
  53.             self:Hide()
  54.         else
  55.             self:Show()
  56.         end
  57.     ]])
  58.  
  59.     button:SetAttribute("_onstate-actionpage",[[
  60.         print("_onstate-actionpage: ",newstate)    
  61.         if not newstate then return end
  62.     ]])
  63.    
  64.     buttons[i] = button
  65. end
  66. barFrame.Buttons = buttons    
  67.  
  68. barFrame:Execute([[
  69.     self:SetAttribute("frameref-button", nil)
  70. ]])
  71.  
  72. barFrame:SetAttribute('_onstate-page', ([[
  73.     if not newstate then return end
  74.     newstate = tonumber(newstate)
  75.     self:SetAttribute("actionpage", newstate)
  76.     local pageOffset, hasAction = (newstate - 1) * NUM_ACTIONBAR_BUTTONS
  77.     for id = 1, #ActionButtons do
  78.         ActionButtons[id]:SetAttribute("actionpage",newstate)
  79.         ActionButtons[id]:SetAttribute("action",id + pageOffset)
  80.     end
  81. ]]):gsub('NUM_ACTIONBAR_BUTTONS', NUM_ACTIONBAR_BUTTONS))
  82.  
  83. RegisterStateDriver( barFrame, "visibility", "[overridebar][vehicleui][target=vehicle, exists] show; hide" )
  84. RegisterStateDriver(barFrame, "page", ("[vehicleui] %s; [overridebar] %s; 1"):format(GetVehicleBarIndex(), GetOverrideBarIndex()))
  85.  
  86. MainMenuBarVehicleLeaveButton:SetParent(barFrame)
  87. MainMenuBarVehicleLeaveButton:SetAllPoints(barFrame.Buttons[12])
  88. RegisterStateDriver(MainMenuBarVehicleLeaveButton, "visibility", "[canexitvehicle] show; hide")
  89.  
  90. hooksecurefunc(OverrideActionBar,"Setup", function(self,skin, barIndex)
  91.     print("OverrideActionBar:Setup", self:GetName(),skin,barIndex)
  92.     for k=1,6 do
  93.         local button = barFrame.Buttons[k]            
  94.         local isHidden = button:GetAttribute("statehidden")
  95.         if button.action then
  96.             local actionType, actionID = GetActionInfo(button.action)
  97.             local iconVisible = button.icon:IsVisible()
  98.             local iconShown = button.icon:IsShown()
  99.             print(k,button.action,isHidden,actionType, actionID,iconVisible,iconShown)
  100.             button:SetAttribute("statehidden",actionID and false or true)
  101.             barFrame:Execute(([[
  102.                 local button = ActionButtons[%d]
  103.                 local action = button:GetAttribute("action")                            
  104.                 local actionType, actionID = action and GetActionInfo(action)           -- actionID is 0 ?
  105.                 print(button:GetID(),action,actionType,actionID)
  106.             ]]):format(k))
  107.         end
  108.     end
  109. end)
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818

Last edited by Xrystal : 06-13-24 at 05:53 AM.
  Reply With Quote
06-13-24, 11:30 AM   #2
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,921
There's a PTR with an 11.0 build (actually I think it's Beta as the server has my Beta characters that I create and/or copied).

Edit: Just saw this but addons work so, when it's "released" (17th)...
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 06-13-24 at 02:12 PM.
  Reply With Quote
06-13-24, 09:33 PM   #3
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,968
Originally Posted by Fizzlemizz View Post
There's a PTR with an 11.0 build (actually I think it's Beta as the server has my Beta characters that I create and/or copied).

Edit: Just saw this but addons work so, when it's "released" (17th)...
Yeah, I found that out after posting that .. but the problem still persists unfortunately And I need to figure out one way or another before the expansion goes live and people go back to playing seriously again .

Options for nUI and the overridebar situation are as follows:
1. Fix the override bar in nUI problems so that ALL quests will work without needing to reload the UI every button update
2. Change nUI's keybinding system so that it uses the main action bar keybinds rather than it's own ones which is the main issue if I don't do option 1.

Option 2 sounds easier, so I will just have to figure that part out and see if it's feasible.
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
  Reply With Quote
06-15-24, 05:18 PM   #4
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,968
Well think I have figured out nUI's issue.

For some reason Scott was using the custom action bar's name based keybinds rather than use the Blizzard action id based keybinds.

Now both the override bar ( in blizzards control ) shows and has working keybinds and so does nUI both before and after the override bar is used. And the keybind screen doesn't have a large bunch of nUI keybinds that don't need to be there.

Next step , is testing it on the combat based override bar quests ( Kung Din and I think Jade Mine Cart) quests.
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
  Reply With Quote
06-17-24, 01:20 PM   #5
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,968
And the plot thickens ..

Started a new time running character to test the bombing run which uses the override bar and that one causes an actual error.


[ADDON_ACTION_FORBIDDEN] AddOn 'nUI' tried to call the protected function 'UseAction()


Even a reload doesn't work. All nUI does is Set the anchor to over nUI's action bars and revert it's moving of the micro menu buttons.

Totally removed nUI's affect on the override bar and the error still occurs.
But if I turn off nUI it all works.

So, something in nUI is breaking it for that one quest.

The only thing I can put it down to is that quest is affected by the keybinding changes I made for nUI's action bars ..

And checking 'The Big Boom' quest in Voldun and that still works as expected.

So, sounds like a 4th type of override bar set up, but I don't have a clue how to identify the problem in this case. Hopefully it's the only one of this type and people can live with clicking for this quest.
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818

Last edited by Xrystal : 06-17-24 at 01:27 PM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » OverrideBar issues rise up again ..


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