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

Mouseup on knob.

For general discussion related FlowStone

Mouseup on knob.

Postby lalalandsynth » Sat Apr 20, 2019 9:58 pm

So I need to use a mousup on a knob so the knob shows values while turned but does not do any switching until I let go of the knob. This works fine for smaller movements on the knob as I stay within the area when moving it a tiny bit.
However, when turning it say from fully ccw to fully cw , the cursor has moved out of the knob area and does not register the mouseup.

Or rather that is what I assume , but when I let go of the knob the cursor is stationed right on top of the knob ,so I am not sure what is going on. I do have to define an area for the mouse , so it must be that .

Any thoughts on how to solve this ?
User avatar
lalalandsynth
 
Posts: 600
Joined: Sat Oct 01, 2016 12:48 pm

Re: Mouseup on knob.

Postby trogluddite » Sat Apr 20, 2019 10:51 pm

Yes, this is normal behaviour - the 'Mouse Up' primitives take things rather literally, only triggering for within-area button releases. The solution is to hook into the way that mouse dragging works...

If you're using 'Green', connect a 'Bool to False Trigger' to the 'Dragging' output of the 'Mouse Drag' primitive. When dragging, the 'Mouse Drag' primitive properly tracks the mouse outside of the original click area, so 'Dragging' going false is essentially an 'anywhere' mouse-up event.

Ruby works similarly. The 'mouseLUp' method gets called for a regular within-area mouse up. Once a drag has been started by calling 'captureMouse', subsequently letting go of the button will call 'mouseLUpCaptured' (and your mouseLUpCaptured' method should usually call 'releaseMouse', otherwise it won't end the drag!)
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
trogluddite
 
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: Mouseup on knob.

Postby lalalandsynth » Sat Apr 20, 2019 11:09 pm

Bingo ! That was it , awesome!
Thanks
User avatar
lalalandsynth
 
Posts: 600
Joined: Sat Oct 01, 2016 12:48 pm

Re: Mouseup on knob.

Postby trogluddite » Sun Apr 21, 2019 12:54 pm

You're welcome. :D

BTW, although this mouse-up behaviour can seem a little bit confusing at first, there is a good reason for it. If you start dragging from a 'source' mouse area, but let go of the button over a different 'destination' mouse area, the source area will receive its 'stop dragging' message, and the destination area will receive a normal mouse-up. This is what makes drag-and-drop features possible...
drag_and_drop_example.fsm
(2.17 KiB) Downloaded 818 times
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
trogluddite
 
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: Mouseup on knob.

Postby tulamide » Sun Apr 21, 2019 1:05 pm

trogluddite wrote:You're welcome. :D

BTW, although this mouse-up behaviour can seem a little bit confusing at first, there is a good reason for it. If you start dragging from a 'source' mouse area, but let go of the button over a different 'destination' mouse area, the source area will receive its 'stop dragging' message, and the destination area will receive a normal mouse-up. This is what makes drag-and-drop features possible...
drag_and_drop_example.fsm

Ooooh, that is a nice example! I never thought of using the behaviour like this! Now we just need IAC or at least windows drag'n'drop and we're back to modern gui design.
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Mouseup on knob.

Postby trogluddite » Sun Apr 21, 2019 1:35 pm

tulamide wrote:Now we just need IAC or at least windows drag'n'drop and we're back to modern gui design.

Well, we only had to wait about a dozen years for mouse-wheel support (in a broken version of FS!), so maybe there's hope yet! :lol:
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
trogluddite
 
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: Mouseup on knob.

Postby lalalandsynth » Sun Apr 21, 2019 4:15 pm

Wow, that is very cool . Wish we had drag and drop to and from daw ;)
User avatar
lalalandsynth
 
Posts: 600
Joined: Sat Oct 01, 2016 12:48 pm

Re: Mouseup on knob.

Postby Spogg » Sun Apr 21, 2019 5:23 pm

trogluddite wrote:... This is what makes drag-and-drop features possible...


Mon dieu! :o

This is brilliant Trog and sparked off my few remaining brain cells.

Have a look at a possible application for setting the contents and order of an FX chain...

Cheers

Spogg
Attachments
Drag and drop for FX ordering v0.001 .fsm
(851.75 KiB) Downloaded 842 times
User avatar
Spogg
 
Posts: 3358
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England

Re: Mouseup on knob.

Postby lalalandsynth » Sun Apr 21, 2019 7:04 pm

Nice Spogg !
User avatar
lalalandsynth
 
Posts: 600
Joined: Sat Oct 01, 2016 12:48 pm

Re: Mouseup on knob.

Postby RJHollins » Sun Apr 21, 2019 7:38 pm

Cool stuff Guys !
8-)
RJHollins
 
Posts: 1571
Joined: Thu Mar 08, 2012 7:58 pm


Return to General

Who is online

Users browsing this forum: No registered users and 66 guests