Go to Page... |
Thread Tools | Display Modes |
03-29-12, 01:50 AM | #1 |
How to stop MultiBarRight from resetting?
SOLVED: Took all previous code and threw it out the window. From researching other people's code I eventually got it to work. Most useful code was Zork's for his rQuestFrameWatcher.
Lua Code:
Thanks again. Last edited by Sasenna : 03-30-12 at 12:50 AM. Reason: Solved |
|
03-29-12, 02:36 AM | #2 |
Did you comment out that bit of code at the end for a reason? Because that might very well do it, if it's reset upon zoning through an instance that means it resets on PLAYER_ENTERING_WORLD and you need to register that event to reapply your changes.
|
|
03-29-12, 10:27 AM | #3 |
I commented out the last bit of code because it was still resetting itself through instances.
|
|
03-30-12, 12:11 AM | #4 | |
Update
Can now make the MultiBarRight return to the correct position after exiting an instance, but entering still resets it to Blizz default.
Had to use RegisterEvent("WORLD_MAP_UPDATE"). Using the Deeprun Tram as a test for instancing. It does reset upon leaving the instance but is not 100%, sometimes have to exit the tram a few times for it to change the bar position. Had in a counter to see how many times the code is gone through, reloading Ui goes through it twice. Entering/Leaving an instance goes through the code 14 times. Using http://www.wowpedia.org/Events/Instance as a basis to work with.
Lua Code:
Its as if the reference point and y axis is being ignored, x axis is correct. Thanks for any help, ~Sas |
||
03-30-12, 01:21 AM | #5 | |
Important notice. When using UserPlaced you must not call your function on PLAYER_LOGIN event. That will reset the SetPoint saved in the layout-local.txt.
I have a tutorial for such a drag functionality here: http://www.wowinterface.com/forums/s...ad.php?t=38484 You need to call SetPoint() right when the code is loaded. Blizzard rewrites that SetPoint() later with the value from the layout-local.txt. But if you call SetPoint() inside the PLAYER_LOGIN event you will reset your values. If you do not want to move your frame ingame at all that's ok. Otherwise your moved frame would reset on every loadup. Another important notice. Do not use "object.SetPoint = function() end" this will most likely cause taints and block your code. Solution. You cannot change the behaviour of the right bar, but your can reanchor all the buttons inside that bar. That's what I'm doing here. http://code.google.com/p/rothui/sour.../bars/bar4.lua That solution works perfectly. Just reparent the bar to a new frame (that has your move functionality) and change the SetPoint of the first actionbutton. In fact...all you have to do is to reanchor the first button. All other buttons are already anchored to that.
__________________
| Simple is beautiful. | WoWI AddOns | GitHub | Zork (WoW)
Last edited by zork : 03-30-12 at 02:43 AM. |
||
WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » How to stop MultiBarRight from resetting? |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|