Page 1 of 1
How to get mouse up events happening outside of mouse area
Posted: Sun Sep 07, 2014 1:04 pm
by tulamide
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?
Re: How to get mouse up events happening outside of mouse ar
Posted: Sun Sep 07, 2014 1:35 pm
by KG_is_back
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.
Re: How to get mouse up events happening outside of mouse ar
Posted: Sun Sep 07, 2014 1:41 pm
by tulamide
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!
Re: How to get mouse up events happening outside of mouse ar
Posted: Sun Sep 07, 2014 3:21 pm
by tester
Unfortunately there is no drag prims for right mouse button (RUp/RDo will have the same issues like left clickers)..
Re: How to get mouse up events happening outside of mouse ar
Posted: Sun Sep 07, 2014 10:40 pm
by tulamide
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.
Re: How to get mouse up events happening outside of mouse ar
Posted: Sun Sep 07, 2014 11:17 pm
by KG_is_back
Unfortunately ruby behaves the same way as I have just tested it.
Re: How to get mouse up events happening outside of mouse ar
Posted: Mon Sep 08, 2014 12:40 am
by billv
or you can put in another mouse up to account for when user moves past gui area...
Re: How to get mouse up events happening outside of mouse ar
Posted: Mon Sep 08, 2014 12:50 am
by tulamide
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?
Re: How to get mouse up events happening outside of mouse ar
Posted: Mon Sep 08, 2014 1:04 am
by billv
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.....
Re: How to get mouse up events happening outside of mouse ar
Posted: Mon Sep 08, 2014 1:29 am
by tulamide
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.