How to change pet bar hotkey color?
I'm using this code to change the color of hotkeys for all my bars. Works fine for everything except the pet bar. Is "PetActionButton" not the correct name or am I completely off and the code doesn't work for the pet bar at all?
Code:
for i = 1, NUM_ACTIONBAR_BUTTONS do |
PetActionBar has it's own set of Update routines. You probably need to hook into those to apply the changes to that bar.
https://github.com/Gethe/wow-ui-sour...ionBar.lua#L93 |
Quote:
|
I haven't tested these but, looking at the Blizzard Dragonflight code ( 10.2.5 ) these lines should work for the main action bar and pet action bar for retail wow.
Lua Code:
Lua Code:
If you are working on Classic versions of wow (1.14.4 and 3.4.3) then it looks like the following could be done instead. Again, untested. Lua Code:
Lua Code:
Give those a go and let us know if they work as expected for you. |
Not working on Classic. Anything wrong with my hotkey additions?
Code:
for i=1, NUM_ACTIONBAR_SLOTS, 1 do |
Not that I can see. I'll play with it later and see if there's something else you have to do for it to work in Classic
|
Okay, took a while, but managed to get it working on Wrath Classic 3.4.3 using the following code
Lua Code:
The call after the hook line triggers it straight away, otherwise it won't trigger until you change the hot key via the options. Not sure whether there will be in combat/secure issues but hopefully being done immediately on addon load rather than via event watching means it won't be a problem. SetTextColor doesn't seem to make a difference at all regardless of where you put it in the code. But, inserting the |c and |r start and end color formatting code sequences seems to work as expected. |
Appreciate you taking the time to do that. Me and my old eyes thank you. Didn't have much time to test it in combat but did notice that the hotkey text acting as a range indicator on both pet and action bars no longer works.
|
Quote:
You could try using this in the hotkey functions and see if that works better Lua Code:
or simplify it further to Lua Code:
|
Perfect. Thanks again, Xrystal!
|
All times are GMT -6. The time now is 07:46 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI