using the bush tool without mousedown
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
using the bush tool without mousedown
Hi All,
Is there a way to use the brush of the tools of drawing without maintaining the button of the mouse pushed ?
Jean-Marc
Is there a way to use the brush of the tools of drawing without maintaining the button of the mouse pushed ?
Jean-Marc
https://alternatic.ch
Re: using the bush tool without mousedown
Hi Jean-Marc,
that is a bit difficult but doable. The problem is that once you are in painting mode the image does not get the mouse messages like mouseUp etc. So to end painting I resorted to letting the user press the option-key (or alt-key on windows). Or when the user leaves the rect of the image browsing mode is restored. To begin painting the user has to click into the image.
I attach a stack that shows what I mean.
regards
Bernd
that is a bit difficult but doable. The problem is that once you are in painting mode the image does not get the mouse messages like mouseUp etc. So to end painting I resorted to letting the user press the option-key (or alt-key on windows). Or when the user leaves the rect of the image browsing mode is restored. To begin painting the user has to click into the image.
I attach a stack that shows what I mean.
regards
Bernd
- Attachments
-
- paintwithoutmouseDown.rev.zip
- (1.72 KiB) Downloaded 310 times
Re: using the bush tool without mousedown
Hi Bernd,
Great. It work. Many thanks
It will allow children who cannot use the physical keyboard and the button of the mouse to draw with a joystick
Regards
Jean-Marc
Great. It work. Many thanks
It will allow children who cannot use the physical keyboard and the button of the mouse to draw with a joystick
Regards
Jean-Marc
https://alternatic.ch
Re: using the bush tool without mousedown
Hi Jean-Marc,
glad it works. If there is anything I could help you with this, just let me know.
regards
Bernd
glad it works. If there is anything I could help you with this, just let me know.
regards
Bernd
Re: using the bush tool without mousedown
Hi Bernd,
If you wait 3 seconds without moving you can go out the image with the browse tool
It work but if you click one more at the same place, the tool stay to browse (i need setting the tool to brush)
Regards
Jean-Marc
The new script of image 1 :
If you wait 3 seconds without moving you can go out the image with the browse tool
It work but if you click one more at the same place, the tool stay to browse (i need setting the tool to brush)
Regards
Jean-Marc
The new script of image 1 :
Code: Select all
local sLastLoc, sTrack,sdepTime --•• jmb 130210 add local sdepTime
on mouseUp
put the ticks into sdepTime --•• jmb 130210
--breakpoint
if sTrack is "" then put false into sTrack
if sTrack is false then
put true into sTrack
set the brushcolor to black
set the brush to 8
choose brush tool
put the mouseLoc into sLastLoc
send trackMouse to me in 25 milliseconds
end if
end mouseUp
on mouseLeave
put false into sTrack
choose browse tool
end mouseLeave
on trackMouse
if sTrack then
-- once in paint mode the image does not get mouseUp/mouseDown messages
-- that is why you have to end painting differently
-- here I use the optionKey = Alt-key on windows
if the optionkey is down then
choose browse tool
put false into sTrack
exit trackMouse
end if
put the mouseLoc into tLoc
--•• bernd
-- drag from sLastLoc to tLoc
-- put tLoc into sLastLoc
--•• bernd end
--•• JMB 130210
if sLastLoc <>tLoc then
drag from sLastLoc to tLoc
put tLoc into sLastLoc
put the ticks into sdepTime
else
if the ticks >sdepTime+180 then --•• after 3 seconds no move set the tool to browse
choose browse tool
exit to top
end if
end if
--••• JMB 130210 end
if "trackMouse" is not in the pendingmessages then
send trackMouse to me in 45 milliseconds -- change time as appropriate
end if
end if
end trackMouse
https://alternatic.ch
Re: using the bush tool without mousedown
Jean-Marc,
I just added one line of code, I post only the changed part. You had to set the script local variable sTrack to false. The way the mouseUp handler is now it only sets the sTrack to true, so when you want to get out of the tracking you have to set sTrack to false.
I think that was the problem.
regards
Bernd
I just added one line of code, I post only the changed part. You had to set the script local variable sTrack to false. The way the mouseUp handler is now it only sets the sTrack to true, so when you want to get out of the tracking you have to set sTrack to false.
Code: Select all
if the ticks >sdepTime+180 then --•• after 3 seconds no move set the tool to browse
choose browse tool
put false into sTrack -- Added this BN
exit to top
end if
regards
Bernd
Re: using the bush tool without mousedown
Yes Bernd,
That was the problem
Thanks
Jean-Marc
That was the problem
Thanks
Jean-Marc
https://alternatic.ch
Re: using the bush tool without mousedown
Hi Bernd,
The paintings tools (eraser,brush, bucket and spray) work fine but not in a standalone or with the player
What i forget ?
Any idea ?
Regards
Jean-Marc
The paintings tools (eraser,brush, bucket and spray) work fine but not in a standalone or with the player
What i forget ?
Any idea ?
Regards
Jean-Marc
https://alternatic.ch
Re: using the bush tool without mousedown
Hi Jean-Marc,
I just tried and it did not work with the standard settings. But if you go to the standalone settings ->General-> click "select inclusion for the standalone settings" then check -> brushes
That works for me in a standalone for MacOSX.
regards
Bernd
I just tried and it did not work with the standard settings. But if you go to the standalone settings ->General-> click "select inclusion for the standalone settings" then check -> brushes
That works for me in a standalone for MacOSX.
regards
Bernd
Re: using the bush tool without mousedown
Hi Bernd,
Vielen Dank noch einmal.
Jean-Marc
Vielen Dank noch einmal.
Jean-Marc
https://alternatic.ch
Re: using the bush tool without mousedown
Jean-Marc,
pas de quoi, puisqu'on était practiquement des voisins...
salut
Bernd
pas de quoi, puisqu'on était practiquement des voisins...
salut
Bernd
Re: using the bush tool without mousedown
Guten Morgen Bernd,
I progress
I builded one revlet but no cursors for painting tools (i have in revmedia 4.0 and in standalone rev 4.0)
Do you have one more idea ?
Jean-Marc
I progress
I builded one revlet but no cursors for painting tools (i have in revmedia 4.0 and in standalone rev 4.0)
Do you have one more idea ?
Jean-Marc
https://alternatic.ch
Re: using the bush tool without mousedown
Jean-Marc,
cursors in revlets do not work (yet). What I did in one case is I created a graphic which is shown at the location of the mouse pointer cursor
http://berndniggemann.on-rev.com/qtvr/
You could do something similar to indicate that the mode changed, not a native look but at least a feedback to the user.
If you want to go that road it should be relatively easy to show a e.g. dot near the cursor.
regards
Bernd
cursors in revlets do not work (yet). What I did in one case is I created a graphic which is shown at the location of the mouse pointer cursor
http://berndniggemann.on-rev.com/qtvr/
You could do something similar to indicate that the mode changed, not a native look but at least a feedback to the user.
If you want to go that road it should be relatively easy to show a e.g. dot near the cursor.
regards
Bernd
Re: using the bush tool without mousedown
Thank Bernd
I'll do images cursor of painting tools
I saw the qtvr in revlet. It is nice
Jean-Marc
I'll do images cursor of painting tools
I saw the qtvr in revlet. It is nice
Jean-Marc
https://alternatic.ch
-
- VIP Livecode Opensource Backer
- Posts: 10057
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: using the bush tool without mousedown
Why does that revlet require access to my hard drive?bn wrote:Jean-Marc,
cursors in revlets do not work (yet). What I did in one case is I created a graphic which is shown at the location of the mouse pointer cursor
http://berndniggemann.on-rev.com/qtvr/
Why does nearly every revlet deployed ask for that? Is there a bug in the standalone builder? Makes RevWeb seem like the scariest plugin ever invented.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn