Could use a hand with custom actionbars
Hey there. I've come across a somewhat annoying little problem regarding the newer version of my custom-made actionbars.
1) actionbars are made from scratch, and the main bar responds to page/possession/vehicle/... changes in regards to the abilities shown 2) the default blizzard bars are removed (hidden, show function cut, all unregistered) now, the issue is as follows: i would like to preserve the default keybindings as the bar layout is actually the same. by default, this actually almost works, in that the bindings will generally hit the respective ability that is visible on the new actionbar (since that same ability is also what would be on the default actionbar at that point in time). the problem is however, that upon spec changing and sometimes (yes, only sometimes..odd rly) upon entering a vehicle (really only noticed it with oculus drakes actually) the bindings do not auto-update and the hotkey hence still tries to cast the respective skill occupied by that button prior to spec changing or entering a vehicle. i figured its a fairly simple problem in that there's probably just some event registered to the default mainactionbar (onupdate would be my guess actually, since hiding alone without unregistering results in the same issues) that would normally take care of adjusting bindings to hit the new ability of reference, and that is merely no longer called due to having effectively removed the default bars. so my question to you is, does anyone know a) what the needed function would be to update the bindings again and b) where exactly its normally called? (i'm normally not this terrible at finding stuff myself but i've been pretty damn blind for the past couple days, lol) |
try and poke in the core files from domino's, bartender, etc to see how they manage the action button paging/switching :)
|
correct me if i'm wrong but last time i checked, i'm fairly certain they both came with custom keybinding, which is pretty much exactly what i'm trying to avoid as i am merely attempting to keep the default bindings working
|
The actual change of which action is associated with an action button is handled via the function ActionButton_UpdateAction. The only way for non-Blizzard code to force a call of that (without taint) is via an action button's OnAttributeChanged script. So you need to make sure that you change a button's attribute (not just set it to the same value).
Looking at your CompactBars.lua and the code directly related to this: Code:
actionbar:SetAttribute("_onstate-page", [[ Code:
actionbar:SetAttribute("_onstate-page", [[ |
the compact bars one is way outdated by now anyways actually
but i'll have a look and see if i can get that working with the new ones :) thanks |
long story short, couldn't get it running like that because the buttons to be updated there are not the ones lacking the action-update (that would be the ones in the mainmenubar that aren't otherwise there anymore).
went with a fairly simple alternate solution (that ends up being a better route anyways rly) instead and just yanked all the bindings off of those and slapped them onto the new bars. works like a charm now. :) |
All times are GMT -6. The time now is 06:21 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI