If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
How to get mouse up events happening outside of mouse area
10 posts
• Page 1 of 1
How to get mouse up events happening outside of mouse area
The title says it. For eample, a view is used to move drawn objects around. If the user releases the mouse button, some calculations need to be done. Works, as long as the user releases the mouse button while inside the view area. But the mouse up event is not triggered if the mouse is released outside of that area.
I need a solution in green and I would want to avoid mouse move tracking via the mouse move prim, if possible. Any ideas?
I need a solution in green and I would want to avoid mouse move tracking via the mouse move prim, if possible. Any ideas?
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: How to get mouse up events happening outside of mouse ar
You provide the MouseArea primitive with view and area. You may input also areas that are outside the view.
It is quite inconsistent with mouse Ldown and Lup primitives. they work correctly when you interact with the module directly, but once the module is inside other module gui, it doesn't work any more. Mouse drag is the only way to go - sample and hold the coordinates on drag start and sample and hold on release.
It is quite inconsistent with mouse Ldown and Lup primitives. they work correctly when you interact with the module directly, but once the module is inside other module gui, it doesn't work any more. Mouse drag is the only way to go - sample and hold the coordinates on drag start and sample and hold on release.
- KG_is_back
- Posts: 1196
- Joined: Tue Oct 22, 2013 5:43 pm
- Location: Slovakia
Re: How to get mouse up events happening outside of mouse ar
Thanks a lot. I wasn't aware of the issues with LDo/LUp. I'll try your tip.
EDIT: Drag with s&h works perfectly. Thanks again!
EDIT: Drag with s&h works perfectly. Thanks again!
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: How to get mouse up events happening outside of mouse ar
Unfortunately there is no drag prims for right mouse button (RUp/RDo will have the same issues like left clickers)..
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
Feel free to donate. Thank you for your contribution.
- tester
- Posts: 1786
- Joined: Wed Jan 18, 2012 10:52 pm
- Location: Poland, internet
Re: How to get mouse up events happening outside of mouse ar
tester wrote:Unfortunately there is no drag prims for right mouse button (RUp/RDo will have the same issues like left clickers)..
I wonder if ruby does have the same issues? If not it might be a good idea to use ruby for mouse messages.
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: How to get mouse up events happening outside of mouse ar
Unfortunately ruby behaves the same way as I have just tested it.
- KG_is_back
- Posts: 1196
- Joined: Tue Oct 22, 2013 5:43 pm
- Location: Slovakia
Re: How to get mouse up events happening outside of mouse ar
or you can put in another mouse up to account for when user moves past gui area...
BV MUSIC SYDNEY AUSTRALIA..Songwriting and Software development
Headquartershttps://www.bvmusicsydneyaustralia.com/
Spotifyhttps://open.spotify.com/artist/7JO8QM40mVmHb7pAwKPJi0
Donatationhttps://www.paypal.com/donate/?hosted_button_id=HEUR8R7K8GZ4L
Headquartershttps://www.bvmusicsydneyaustralia.com/
Spotifyhttps://open.spotify.com/artist/7JO8QM40mVmHb7pAwKPJi0
Donatationhttps://www.paypal.com/donate/?hosted_button_id=HEUR8R7K8GZ4L
- billv
- Posts: 1157
- Joined: Tue Aug 31, 2010 3:34 pm
- Location: Australia
Re: How to get mouse up events happening outside of mouse ar
Thank you for the schematic. I confess that I don't understand why and how it works, since both ruby instances only activate isinmousepoint. Where are the booleans triggered?
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: How to get mouse up events happening outside of mouse ar
The main module, goes True on Mouse down and false on mouse up...
The outer module, just has a false on mouse up, to account for user movement.
Downside is the mouse pointer will be 'activated' when over any part of outer module,
so it's not very discreet.
the mouse drag solution posted earlier is better way to go.....
The outer module, just has a false on mouse up, to account for user movement.
Downside is the mouse pointer will be 'activated' when over any part of outer module,
so it's not very discreet.
the mouse drag solution posted earlier is better way to go.....
BV MUSIC SYDNEY AUSTRALIA..Songwriting and Software development
Headquartershttps://www.bvmusicsydneyaustralia.com/
Spotifyhttps://open.spotify.com/artist/7JO8QM40mVmHb7pAwKPJi0
Donatationhttps://www.paypal.com/donate/?hosted_button_id=HEUR8R7K8GZ4L
Headquartershttps://www.bvmusicsydneyaustralia.com/
Spotifyhttps://open.spotify.com/artist/7JO8QM40mVmHb7pAwKPJi0
Donatationhttps://www.paypal.com/donate/?hosted_button_id=HEUR8R7K8GZ4L
- billv
- Posts: 1157
- Joined: Tue Aug 31, 2010 3:34 pm
- Location: Australia
Re: How to get mouse up events happening outside of mouse ar
billv wrote:The main module, goes True on Mouse down and false on mouse up...
The outer module, just has a false on mouse up, to account for user movement.
Downside is the mouse pointer will be 'activated' when over any part of outer module,
so it's not very discreet.
the mouse drag solution posted earlier is better way to go.....
Now I understand it. Sorry for being such a slow thinker, it's late at night here in germany. A cool cheat! If someone wants to do it with ruby, it may be the way to detect mouse up messages outside of the current area.
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
10 posts
• Page 1 of 1
Who is online
Users browsing this forum: Google [Bot] and 33 guests