lotrointerface.com
Search Downloads


Go Back   LoTROInterface > LotRO > General Discussion & Support > Interface Help (L)

Reply
Thread Tools Display Modes
  #1  
Unread 09-10-2013, 06:27 AM
Radicus's Avatar
Radicus Radicus is offline
The Undefeated
Interface Author - Click to view interfaces
 
Join Date: Aug 2012
Posts: 5
Help with Quickslot plugin... not updating quickslot

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!
Attached Files
File Type: zip RadicusPlugins.zip (19.9 KB, 1233 views)
__________________
Radicus Hood - Protectors of Middle Earth, Riddermark

http://www.anotherworld.com.au/lotro...0Signature.jpg
Reply With Quote
  #2  
Unread 09-10-2013, 09:46 AM
Garan's Avatar
Garan Garan is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Oct 2010
Posts: 340
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()
 if Count>0 then
  Count=Count-1
 end
 Countqs:SetWantsUpdates(true)
end
Countqs.Update = function()
 UpdateAliases(Channel);
 Countqs:SetWantsUpdates(false)
end
The mouse click event now just enables the Update handler which fires asynchronously on the next frame render. It's important to turn off updates inside the Update event handler so that you don't waste machine cycles on every update. This enables the client to update the quickslot after it is completely done firing it's internal events for the quickslot so Lua doesn't stomp on the alias as it's being used.

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.

Last edited by Garan : 09-10-2013 at 09:49 AM.
Reply With Quote
  #3  
Unread 09-10-2013, 10:39 AM
Radicus's Avatar
Radicus Radicus is offline
The Undefeated
Interface Author - Click to view interfaces
 
Join Date: Aug 2012
Posts: 5
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!
__________________
Radicus Hood - Protectors of Middle Earth, Riddermark

http://www.anotherworld.com.au/lotro...0Signature.jpg
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Quickslot arrows adjustment liftedplane XML modification help (L) 4 10-26-2012 03:52 AM
Quickslot acting strangely with U6 Eili Interface Help (L) 0 03-13-2012 07:56 PM
Re-sizeable quickslot icons now possible! MrJackdaw Lua Programming Help (L) 1 12-27-2010 06:41 PM
Quickslot Problems Skald Interface Help (L) 3 07-01-2007 10:21 AM
quickslot bar 2 wheatgerm General Authoring Discussion (L) 3 05-14-2007 07:46 AM


All times are GMT -5. The time now is 05:20 PM.


Our Network
EQInterface | EQ2Interface | Minion | WoWInterface | ESOUI | LoTROInterface | MMOUI | Swtorui