StanceButton1 taint in nMainbar
So, Blizzard was kind enough introduce StanceButton1:SetPoint(...) inside StanceBar.lua:StanceBar_Update() :(
Code:
function StanceBar_Update () So I tried a couple of hacks to prevent StanceBar_Update() from moving StanceButton1: 1. I just override Blizzard's function, however this obviously caused taint issues. lua Code:
2. I figured I could force the statement numForms == 1 to always be false, because that's the only time they re-position. I figured this was a golden solution, however, it also caused taint :( lua Code:
3. Now I tried to save the position of StanceButton1 before StanceBar_Update() moves it, and do a hooksecurefunc('StanceBar_Update', ...) and move it after that. Also taint, apparently, you can't do StanceButton1:ClearAllPoints() from inside that hook (WTF?): lua Code:
4. Next, I came up with the idea of just calling StanceBar_Update() immediately in my code to have it execute before the user position got set. This oddly enough also caused taint :confused: lua Code:
5. This works, but is ugly as hell and some quirks appear from time to time: lua Code:
The taint causes a interface blocked action thingie when trying to do action bar switching when in combat, and blocked it from switching. Anyone have any thoughts? I find it weird that StanceButton1:ClearAllPoints() sometimes causes taint, and sometimes it doesn't. Oh yeah, the addon is nMainbar and here's the MoP source: https://github.com/renstrom/NeavUI/b.../stancebar.lua. |
You didn't try using hooksecurefunc() by chance, did you?
|
Quote:
Quote:
|
Can you not move the entire StanceBar instead?
|
Quote:
lua Code:
|
Will not work either. On bars with only one form the StanceButton1 will always reset. Thus you have to actually reparent the StanceBarFrame.
My full solution is here: http://code.google.com/p/rothui/sour.../stancebar.lua I have a new frame that the stancebar is reparented to. On unlocking a dragFrame will show up on a pretty high framelevel thus overlaying all the other frames. The drag event is delegated to the frame in the bottom thus the bottom frame will move. |
Quote:
Since Blizzard doesn't re-anchor StanceBarFrame like they do StanceButton1, when they run StanceBar_Update() it will just anchor StanceButton1 to whatever user position StanceBarFrame has. Plus I can't have an overlay show up every time the user presses alt+shift (I'm not using slash commands). |
So it seems like as of build 15913 Blizzard is no longer moving the StanceButton1 inside the StanceBar_Update() function when GetNumShapeshiftForms() == 1 :banana:
https://github.com/p3lim/wow-ui-sour...99afb4f7#L75L5 |
... how nice.
I can confirm that. Updated my version of rActionBarStyler already. |
All times are GMT -6. The time now is 03:01 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI