Support

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

For general discussion related FlowStone

How to get mouse up events happening outside of mouse area

Postby tulamide » Sun Sep 07, 2014 1:04 pm

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?
"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

Postby KG_is_back » Sun Sep 07, 2014 1:35 pm

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.
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

Postby tulamide » Sun Sep 07, 2014 1:41 pm

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!
"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

Postby tester » Sun Sep 07, 2014 3:21 pm

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.
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

Postby tulamide » Sun Sep 07, 2014 10:40 pm

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

Postby KG_is_back » Sun Sep 07, 2014 11:17 pm

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

Postby billv » Mon Sep 08, 2014 12:40 am

or you can put in another mouse up to account for when user moves past gui area...
mouse up cheating.fsm
(106.4 KiB) Downloaded 950 times
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

Postby tulamide » Mon Sep 08, 2014 12:50 am

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

Postby billv » Mon Sep 08, 2014 1:04 am

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. :lol:
the mouse drag solution posted earlier is better way to go.....
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

Postby tulamide » Mon Sep 08, 2014 1:29 am

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. :lol:
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


Return to General

Who is online

Users browsing this forum: No registered users and 76 guests

cron