Help with Quickslot plugin... not updating quickslot
1 Attachment(s)
Hi,
Was wondering if someone could give me a hand with this little plugin I'm working on. There's a Countdown timer quickslot button which in theory should change value each time it is clicked and send the updated qs data to the selected channel, ie. raid, fellowship or general. If you hover the mouse over the button, the tip will show the qs data, and it is displayed in the correct format with the channel and timer. eg "/ra 6". When you click on the button, the alias information updates as the counter ticks down, but it is not sent to the selected channel. The weird thing is, when the timer reaches the end, the final qs data IS displayed... ie. No "6", "5", "4", "3", "2" ," 1", just "Engage!" The bit you need to see the last couple of sections in the window.lua file. Any help appreciated! |
This is an oddity in how the client handles mouse click events for quickslots. Note that if you right click you will get the result you want, it only affects the left click (at least for me). You are changing the quickslot alias in the handler that fires for a click which messes up the underlying pointers for the alias in the client causing it to evaluate to nothing (until the click after it is assigned to "Engage!" since it isn't really changing after that). Note that if you count your left clicks, the text is changed to "Engage!" on the click before "Engage!" actually shows up.
You can fairly easily get around this by changing the text asynchronously using an Update event handler: Code:
Countqs.MouseClick=function() Note, you probably could have changed to using the MouseUp handler since it is probably fired after the internal event is handled but since MouseUp can be fired for situations that are not clicks, it is not a good solution so I didn't even bother testing if it would have worked. |
Ah! The good ol SetWantUpdates(true) oddity strikes again. Had me stumped for hours and I did try that in several iterations/combinations but couldn't get it to fire.
That worked a treat, thanks again dude! |
All times are GMT -5. The time now is 04:41 AM. |
vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI