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.
10 posts
• Page 1 of 1
Mouseup on knob.
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 ?
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 ?
-
lalalandsynth - Posts: 600
- Joined: Sat Oct 01, 2016 12:48 pm
Re: Mouseup on knob.
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!)
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!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: Mouseup on knob.
Bingo ! That was it , awesome!
Thanks
Thanks
-
lalalandsynth - Posts: 600
- Joined: Sat Oct 01, 2016 12:48 pm
Re: Mouseup on knob.
You're welcome.
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...
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...
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: Mouseup on knob.
trogluddite wrote:You're welcome.
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...
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.
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!
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: Mouseup on knob.
Wow, that is very cool . Wish we had drag and drop to and from daw
-
lalalandsynth - Posts: 600
- Joined: Sat Oct 01, 2016 12:48 pm
Re: Mouseup on knob.
trogluddite wrote:... This is what makes drag-and-drop features possible...
Mon dieu!
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 843 times
-
Spogg - Posts: 3358
- Joined: Thu Nov 20, 2014 4:24 pm
- Location: Birmingham, England
10 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 84 guests